diff --git a/tests/test_commands.py b/tests/test_commands.py index a1008bae..e8bee426 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -25,9 +25,9 @@ def unpack_db_json(filename): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/{}'.format(filename))) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) with open(testdata) as json_file: data = json.load(json_file) return data @@ -65,27 +65,27 @@ def runner(): def config(): config = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'configExample.json')) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - config = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/configExample.json')) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # config = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/configExample.json')) return config @pytest.fixture def path_testdata(): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/sampleinfo_samples.json')) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) return testdata @pytest.fixture def path_testproject(): testproject = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/AAA1234_2000.1.2_3.4.5')) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testproject = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testproject/AAA1234_2000.1.2_3.4.5')) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testproject = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testproject/AAA1234_2000.1.2_3.4.5')) return testproject diff --git a/tests/test_database.py b/tests/test_database.py index 7b6f1e67..bd5a468f 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -20,9 +20,9 @@ def unpack_db_json(filename): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/{}'.format(filename))) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) with open(testdata) as json_file: data = json.load(json_file) return data diff --git a/tests/test_jobcreator.py b/tests/test_jobcreator.py index b1c8556d..36f7fab5 100644 --- a/tests/test_jobcreator.py +++ b/tests/test_jobcreator.py @@ -20,9 +20,9 @@ def testdata(): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/sampleinfo_samples.json')) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) with open(testdata) as json_file: data = json.load(json_file) return data diff --git a/tests/test_reporter.py b/tests/test_reporter.py index 47e39f07..3aed76b5 100644 --- a/tests/test_reporter.py +++ b/tests/test_reporter.py @@ -22,9 +22,9 @@ def unpack_db_json(filename): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/{}'.format(filename))) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) with open(testdata) as json_file: data = json.load(json_file) return data diff --git a/tests/test_scraper.py b/tests/test_scraper.py index c4b5718b..bd376bf0 100644 --- a/tests/test_scraper.py +++ b/tests/test_scraper.py @@ -18,18 +18,18 @@ def testdata_prefix(): test_path = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/')) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - test_path = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/')) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # test_path = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/')) return test_path @pytest.fixture def testdata(): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/sampleinfo_samples.json')) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) with open(testdata) as json_file: data = json.load(json_file) return data diff --git a/tests/test_webserver.py b/tests/test_webserver.py index 0a48a128..99a7ebd7 100644 --- a/tests/test_webserver.py +++ b/tests/test_webserver.py @@ -22,9 +22,9 @@ def unpack_db_json(filename): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/{}'.format(filename))) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/{}'.format(filename))) with open(testdata) as json_file: data = json.load(json_file) return data @@ -51,9 +51,9 @@ def mock_db(): def testdata(): testdata = os.path.abspath(os.path.join(pathlib.Path(__file__).parent.parent, 'tests/testdata/sampleinfo_samples.json')) #Check if release install exists - for entry in os.listdir(get_python_lib()): - if 'microSALT-' in entry: - testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) + #for entry in os.listdir(get_python_lib()): + # if 'microSALT-' in entry: + # testdata = os.path.abspath(os.path.join(os.path.expandvars('$CONDA_PREFIX'), 'testdata/sampleinfo_samples.json')) with open(testdata) as json_file: data = json.load(json_file) return data