diff --git a/setup.cfg b/setup.cfg index 9d19c90..c08ae7b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -69,9 +69,13 @@ exclude = dev = ipython>=7.5 jupyter>=1.0 + pytest + pytest-cov + pytest-optional-tests pyyaml restview tox + vcrpy yapf docs = sphinx @@ -102,8 +106,8 @@ max-complexity = 10 ignore = E129,E221,E241,E251,E303,W291 [tool:pytest] -addopts = --cov-config=setup.cfg --cov-report term-missing --cov=bioutils --doctest-modules --doctest-glob='*.rst' --strict -collect_ignore = setup.py +addopts = --cov-config=setup.cfg --cov-report term-missing --cov=bioutils --doctest-modules --doctest-glob='*.rst' --strict-markers +# collect_ignore = setup.py doctest_optionflags = ALLOW_UNICODE ALLOW_BYTES ELLIPSIS IGNORE_EXCEPTION_DETAIL NORMALIZE_WHITESPACE norecursedirs = _data @@ -111,5 +115,7 @@ norecursedirs = build .tox testpaths = src tests -optional_tests = - network: run network tests +markers = + network +#optional_tests = +# network: run network tests diff --git a/tests/test_sequences.py b/tests/test_sequences.py index 6a9a613..334ef5d 100644 --- a/tests/test_sequences.py +++ b/tests/test_sequences.py @@ -1,6 +1,6 @@ import pytest from bioutils.sequences import translate_cds -from src.bioutils.sequences import TranslationTable +from bioutils.sequences import TranslationTable def test_translate_examples(): @@ -29,21 +29,13 @@ def test_translate_examples(): def test_translate_selenoproteins(): """unit test for sec codon""" assert translate_cds("AUGTGATAA") == "M**" - assert ( - translate_cds("AUGTGATAA", translation_table=TranslationTable.standard) == "M**" - ) - assert ( - translate_cds("AUGTGATAA", translation_table=TranslationTable.selenocysteine) - == "MU*" - ) - assert ( - translate_cds( - "AUGTGATA", - translation_table=TranslationTable.selenocysteine, - full_codons=False, - ) - == "MU*" - ) + assert (translate_cds("AUGTGATAA", translation_table=TranslationTable.standard) == "M**") + assert (translate_cds("AUGTGATAA", translation_table=TranslationTable.selenocysteine) == "MU*") + assert (translate_cds( + "AUGTGATA", + translation_table=TranslationTable.selenocysteine, + full_codons=False, + ) == "MU*") with pytest.raises(ValueError): translate_cds("AUGTGATA", translation_table=TranslationTable.selenocysteine)