Skip to content

Bulk asynchronous downloader for multiple file hosts

tests: update startup tests

NTFSvolumebc516eafd121
diff --git a/cyberdrop_dl/cli/main.py b/cyberdrop_dl/cli/main.py
index 64d074fd3..deb3773c4 100644
--- a/cyberdrop_dl/cli/main.py
+++ b/cyberdrop_dl/cli/main.py
@@ -129,7 +129,7 @@ def interactive(
Parameter(
alias="-i",
help="Text/HTML file with URL(s) to download",
- validator=cyclopts.validators.Path(exists=True, dir_okay=False),
+ validator=cyclopts.validators.Path(dir_okay=False),
),
] = Path("URLs.txt"), # pyright: ignore[reportCallInDefaultInitializer]
cli: CLIargs | None = None,
diff --git a/tests/test_startup.py b/tests/test_startup.py
index 1158abe44..0344af10b 100644
--- a/tests/test_startup.py
+++ b/tests/test_startup.py
@@ -1,3 +1,5 @@
+from pathlib import Path
+
import pytest
from cyberdrop_dl import program_ui
@@ -13,12 +15,14 @@ def test_startup(capsys: pytest.CaptureFixture[str]) -> None:
with pytest.MonkeyPatch.context() as m:
m.setattr(program_ui, "run", main_ui)
- run_cdl(())
+ run_cdl(["interactive"])
captured = capsys.readouterr()
output = captured.out
assert msg in output
-def test_async_startup(caplog: pytest.LogCaptureFixture) -> None:
- run_cdl(("--download",))
+def test_async_startup(tmp_cwd: Path, caplog: pytest.LogCaptureFixture) -> None:
+ file = "URLs.txt"
+ (tmp_cwd / file).touch()
+ run_cdl(("download", "--input-file", file))
assert "Finished downloading. Enjoy :)" in caplog.text