diff options
| author | Arun Isaac | 2026-08-15 01:49:20 +0100 |
|---|---|---|
| committer | Arun Isaac | 2026-08-15 20:53:16 +0100 |
| commit | d9701953f6c755afea218bf10064e794a1167242 (patch) | |
| tree | 8e5a4e38196786d163c9063ccf6051d3b68de217 /tests | |
| parent | 2e6709e22b940c7ea9a89c8e4330582c97aa81d8 (diff) | |
| download | domagi-d9701953f6c755afea218bf10064e794a1167242.tar.gz domagi-d9701953f6c755afea218bf10064e794a1167242.tar.lz domagi-d9701953f6c755afea218bf10064e794a1167242.zip | |
Error out if user-specified path does not exist.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_domagi.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_domagi.py b/tests/test_domagi.py index 757d1ec..3f63550 100644 --- a/tests/test_domagi.py +++ b/tests/test_domagi.py @@ -316,3 +316,20 @@ def test_domagi_view(tmp_path, test_data_file): assert result.exit_code == 0 with open(test_data_file) as expected: assert_gfa_equal(expected, io.StringIO(result.stdout)) + +def test_error_on_missing_paths(tmp_path): + test_data_file = Path("test-data/test1.gfa") + duckdb_path = tmp_path / f"{test_data_file.stem}.db" + runner = CliRunner() + result = runner.invoke(main, ["build", + "--gfa", test_data_file, + "--out", duckdb_path]) + assert result.exit_code == 0 + result = runner.invoke(main, ["depth", + "--db", duckdb_path, + "--path", "xx"]) + assert result.exit_code == 1 and result.output == "Paths ['xx'] not found\n" + result = runner.invoke(main, ["overlap", + "--db", duckdb_path, + "--path", "xx"]) + assert result.exit_code == 1 and result.output == "Paths ['xx'] not found\n" |
