- changed status to resolved
Wrong relative path to tests/data/test_isolate_* files
Issue #64
resolved
The documentation in the main README file clearly says to run the tests as follows from the main ResFinder directory:
python3 tests/functional_tests.py
However, the code currently refers to test FASTA and FASTQ files via relative paths like data/test_isolate_01.fa
- and the tests all fail. Running the individual commands shows error messages about this files not being found (because their path is wrong).
These should all be tests/data/test_isolate_01.fa
and so on, or the code could adjust the paths depending where the tests are being run from (e.g. use self.dir_res
and os.path.join
or similar). Suggested fix:
$ git diff tests/functional_tests.py
diff --git a/tests/functional_tests.py b/tests/functional_tests.py
index 2843f30..12acb42 100755
--- a/tests/functional_tests.py
+++ b/tests/functional_tests.py
@@ -16,11 +16,11 @@ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
test_names = ["test1", "test2", "test3", "test4"]
test_data = {
# Test published acquired resistance
- test_names[0]: "data/test_isolate_01.fa",
- test_names[1]: "data/test_isolate_01_1.fq data/test_isolate_01_2.fq",
+ test_names[0]: "tests/data/test_isolate_01.fa",
+ test_names[1]: "tests/data/test_isolate_01_1.fq tests/data/test_isolate_01_2.fq",
# Test published point mut resistance
- test_names[2]: "data/test_isolate_05.fa",
- test_names[3]: "data/test_isolate_05_1.fq data/test_isolate_05_2.fq",
+ test_names[2]: "tests/data/test_isolate_05.fa",
+ test_names[3]: "tests/data/test_isolate_05_1.fq tests/data/test_isolate_05_2.fq",
}
run_test_dir = "running_test"
working_dir = os.path.dirname(os.path.realpath(__file__))
Comments (1)
-
reporter - Log in to comment
Working now, unclear what I did wrong earlier in the week.
Installation on 64-bit Linux with dependencies installed using conda (using conda-forge and bioconda channels):
Key dependency versions:
Using version 4.1.6 from github:
Databases installed as per https://bitbucket.org/genomicepidemiology/resfinder/src/master/README.md documentation,
and:
Sadly the test suite does not default to blastn and kma being on the path (that might need to change for a conda installation), but we can specify their location: