aboutsummaryrefslogtreecommitdiff
path: root/tests/test_parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_parse.py')
-rw-r--r--tests/test_parse.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index 0d33e74..79ac490 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -85,10 +85,14 @@ class TestReadBatchFile:
tmp_file.write_text("File:Foo.jpg\nFile:Bar.jpg\nFile:Baz.jpg\n")
return read_batch_file(str(tmp_file))
- def test_batch_file_log(self, caplog: pytest.LogCaptureFixture) -> None:
+ def test_batch_file_log(
+ self, caplog: pytest.LogCaptureFixture, tmp_path: Path
+ ) -> None:
caplog.set_level(logging.INFO)
- _ = read_batch_file("batch.txt")
- assert "Using file 'batch.txt' for batch download" in caplog.text
+ tmp_file = tmp_path / "batch.txt"
+ tmp_file.write_text("File:Foo.jpg\n")
+ _ = read_batch_file(str(tmp_file))
+ assert f"Using file '{tmp_file}' for batch download" in caplog.text
def test_batch_file_length(self, dl_list: Dict[int, str]) -> None:
assert len(dl_list) == 3