diff options
| -rw-r--r-- | test-data/expected-output/test1.fa | 4 | ||||
| -rw-r--r-- | test-data/expected-output/test2.fa | 4 | ||||
| -rw-r--r-- | test-data/expected-output/test3.fa | 4 | ||||
| -rw-r--r-- | tests/test_domagi.py | 22 |
4 files changed, 34 insertions, 0 deletions
diff --git a/test-data/expected-output/test1.fa b/test-data/expected-output/test1.fa new file mode 100644 index 0000000..4d6c56c --- /dev/null +++ b/test-data/expected-output/test1.fa @@ -0,0 +1,4 @@ +>x +CAAATAAGGCTTGGAAATTTTCTGGAGTTCTATTATATTCCAACTCTCTG +>y +CAAATAAGATTTGAAAATTTTCTGGAGTTCTATAATATACCAACTCTCTG diff --git a/test-data/expected-output/test2.fa b/test-data/expected-output/test2.fa new file mode 100644 index 0000000..3176db1 --- /dev/null +++ b/test-data/expected-output/test2.fa @@ -0,0 +1,4 @@ +>5+ +AGGATCTCTCAGG +>5- +AGGAGATCTCAGG diff --git a/test-data/expected-output/test3.fa b/test-data/expected-output/test3.fa new file mode 100644 index 0000000..5185467 --- /dev/null +++ b/test-data/expected-output/test3.fa @@ -0,0 +1,4 @@ +>5+ +AGGATCTCTCAGGTCTCAGG +>5- +AGGAGATCTCAGG diff --git a/tests/test_domagi.py b/tests/test_domagi.py index 73897cf..4af8c37 100644 --- a/tests/test_domagi.py +++ b/tests/test_domagi.py @@ -207,6 +207,28 @@ def test_domagi_paths(tmp_path, test_data_file, expected_output): header=None), check_dtype=False) +@pytest.mark.xfail +@pytest.mark.parametrize("test_data_file, expected_output", + [(Path("test-data/test1.gfa"), + Path("test-data/expected-output/test1.fa")), + (Path("test-data/test2.gfa"), + Path("test-data/expected-output/test2.fa")), + (Path("test-data/test3.gfa"), + Path("test-data/expected-output/test3.fa"))]) +def test_domagi_paths_fasta(tmp_path, test_data_file, expected_output): + 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, ["paths", + "--fasta", + "--db", duckdb_path]) + assert result.exit_code == 0 + with open(expected_output) as file: + assert result.stdout == file.read() + @pytest.mark.parametrize("test_data_file, expected_output", [(Path("test-data/test1.gfa"), Path("test-data/expected-output/test1-stats")), |
