Skip to content

Commit

Permalink
Add pytest 'data_download' mark
Browse files Browse the repository at this point in the history
Exclude tests that need datafiles from tox, since
travis doesn't support ftp.
  • Loading branch information
sbliven committed Jun 27, 2020
1 parent ed32613 commit f631e6d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ markers =
no_external_software_required: test can be run without external detectors
notfixed: known failing tests
slow: slow tests
data_download: Requires downloading data values
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ commands = flake8 tral/
deps =
-r{toxinidir}/requirements_dev.txt

# For now, only run travis-compatible tests
commands =
pytest -m no_external_software_required
pytest -m no_external_software_required -m "not data_download"
1 change: 1 addition & 0 deletions tral/repeat/test/repeat_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def test_standardize_amino_acids():
assert repeat.standardize("ABDEF-G", "AA") == "ADDEF-G"


@pytest.mark.data_download # needs data/pvalue/AA/phylo_gap01/3_2.npz
@pytest.mark.no_external_software_required
def test_repeat_ambiguous():

Expand Down
2 changes: 1 addition & 1 deletion tral/sequence/test/sequence_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def test_detect_repeats_with_repeat():
assert test_optimized_repeat.repeats[0].msa == TEST_RESULT_REPEAT_MSA_SINGLE


@pytest.mark.no_external_software_required
# Requires hmmbuild
def test_too_big_hmms():

test_repeat = repeat.Repeat(msa=TEST_RESULT_REPEAT_MSA_LONG)
Expand Down
2 changes: 1 addition & 1 deletion tral/test/test_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def test_package_config(config_dir):
with pytest.raises(FileNotFoundError):
ini_file = paths.config_file('foo', config_dir=config_dir, config_url=DISABLED_URL)


@pytest.mark.data_download
@pytest.mark.no_external_software_required
def test_download_config(config_dir):
small_file = ["data",
Expand Down

0 comments on commit f631e6d

Please sign in to comment.