Skip to content

Commit

Permalink
remove deprecated pytest slow Marks
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwengers committed Aug 10, 2023
1 parent e48835d commit b2e602f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 19 deletions.
2 changes: 0 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
[pytest]
addopts = --strict-markers
markers =
slow: mark tests as slow.
13 changes: 0 additions & 13 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from _pytest.mark import Mark


global FILES

Expand All @@ -10,14 +8,3 @@
'test.plasmid.fasta',
'test.tsv'
]


empty_mark = Mark('', [], {})


def by_slow_marker(item):
return item.get_closest_marker('slow', default=empty_mark)


def pytest_collection_modifyitems(items):
items.sort(key=by_slow_marker, reverse=False)
4 changes: 0 additions & 4 deletions test/test_platon.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from .conftest import FILES


@pytest.mark.slow
def test_platon_db_parameter(tmpdir):
# full test on draft assembly containing plasmid contigs
proc = run(['bin/platon', '--db', 'test/db', '--output', tmpdir, '--prefix', 'test', 'test/data/mock-sample.fna'])
Expand All @@ -18,7 +17,6 @@ def test_platon_db_parameter(tmpdir):
assert Path.exists(output_path)


@pytest.mark.slow
def test_platon_db_env(tmpdir):
# full test on draft assembly containing plasmid contigs

Expand All @@ -33,7 +31,6 @@ def test_platon_db_env(tmpdir):
assert Path.exists(output_path)


@pytest.mark.slow
def test_platon_w_plasmids(tmpdir):
# full test on draft assembly containing plasmid contigs
proc = run(['bin/platon', '--db', 'test/db', '--output', tmpdir, '--prefix', 'test', 'test/data/draft-w-plasmids.fna'])
Expand All @@ -46,7 +43,6 @@ def test_platon_w_plasmids(tmpdir):
assert output_path.stat().st_size > 0


@pytest.mark.slow
def test_platon_wo_plasmids(tmpdir):
# full test on draft assembly containing no plasmid contigs
proc = run(['bin/platon', '--db', 'test/db', '--output', tmpdir, '--prefix', 'test', 'test/data/draft-wo-plasmids.fna'])
Expand Down

0 comments on commit b2e602f

Please sign in to comment.