about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2026-08-14 22:09:21 +0100
committerArun Isaac2026-08-15 20:53:15 +0100
commita7806b70c6d651acfdbbaeaa986b4bd28f1d685a (patch)
treec2f18c4ddfbb1564b19593815d994929dfdee2d7 /tests
parentbc371f2374156b7f6593ef0287bfb52b478ed92e (diff)
downloaddomagi-a7806b70c6d651acfdbbaeaa986b4bd28f1d685a.tar.gz
domagi-a7806b70c6d651acfdbbaeaa986b4bd28f1d685a.tar.lz
domagi-a7806b70c6d651acfdbbaeaa986b4bd28f1d685a.zip
Add domagi overlap --paths.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_domagi.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_domagi.py b/tests/test_domagi.py
index d678a3f..757d1ec 100644
--- a/tests/test_domagi.py
+++ b/tests/test_domagi.py
@@ -214,6 +214,23 @@ def test_domagi_overlap(tmp_path, test_data_file, expected_output):
                        .sort_values(by=["#path", "path.touched"],
                                     ignore_index=True),
                        check_dtype=False)
+    # Test passing in the paths through a file.
+    paths_file = tmp_path / "paths"
+    with open(paths_file, "w") as file:
+        for path in paths:
+            print(path, file=file)
+    result = runner.invoke(main, ["overlap",
+                                  "--db", duckdb_path,
+                                  "--paths", paths_file])
+    assert result.exit_code == 0
+    assert_frame_equal(pd.read_csv(expected_output, sep="\t")
+                       .sort_values(by=["#path", "path.touched"],
+                                    ignore_index=True),
+                       pd.read_csv(io.StringIO(result.stdout),
+                                   sep="\t")
+                       .sort_values(by=["#path", "path.touched"],
+                                    ignore_index=True),
+                       check_dtype=False)
 
 @pytest.mark.parametrize("test_data_file, expected_output",
                          [(Path("test-data/test1.gfa"),