Skip to content

Commit

Permalink
test: make file locations independent of where pytest is run from
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Jun 2, 2023
1 parent e77222b commit 1b9b909
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,19 @@ def run_end_to_end(tmp_path, data_file, expected_dir):
assert result.common == result.right_list


def test_small(tmp_path):
run_end_to_end(tmp_path, "tests/data-small.fasta", "./tests/expected-results-small")
def test_small(tmp_path, request):
pwd = request.fspath.dirname
run_end_to_end(tmp_path,
os.path.join(pwd, "data-small.fasta"),
os.path.join(pwd, "expected-results-small"))


@pytest.mark.slow
def test_large(tmp_path):
run_end_to_end(tmp_path, "tests/data-large.fasta", "./tests/expected-results-large")
def test_large(tmp_path, request):
pwd = request.fspath.dirname
run_end_to_end(tmp_path,
os.path.join(pwd, "data-large.fasta"),
os.path.join(pwd, "expected-results-large"))


@pytest.fixture(scope="session")
Expand Down

0 comments on commit 1b9b909

Please sign in to comment.