aboutsummaryrefslogtreecommitdiff
path: root/tests/test_dl.py
diff options
context:
space:
mode:
authorCody Logan <cody@lokken.dev>2023-11-30 10:11:21 -0800
committerCody Logan <cody@lokken.dev>2023-11-30 10:35:48 -0800
commit26b2bfea7434aeb9d3687397341e0e7ad3f4edfc (patch)
tree3eceae1d348454734bfd34f38728d33ce6f900e8 /tests/test_dl.py
parent61b3733efd7b28bc2d3601aa9609a1119630c9ab (diff)
downloadwikiget-26b2bfea7434aeb9d3687397341e0e7ad3f4edfc.tar.gz
wikiget-26b2bfea7434aeb9d3687397341e0e7ad3f4edfc.zip
Have functions return an exit code instead of calling sys.exit
Diffstat (limited to 'tests/test_dl.py')
-rw-r--r--tests/test_dl.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_dl.py b/tests/test_dl.py
index 7117e50..63408eb 100644
--- a/tests/test_dl.py
+++ b/tests/test_dl.py
@@ -241,10 +241,10 @@ class TestBatchDownload:
mock_read_batch_file.side_effect = OSError("error message")
args = parse_args(["-a", "batch.txt"])
- with pytest.raises(SystemExit):
- _ = batch_download(args)
+ errors = batch_download(args)
assert mock_read_batch_file.called
+ assert errors == 1
assert caplog.record_tuples == [
("wikiget.dl", logging.ERROR, "File could not be read: error message"),
]