Skip to content

Commit

Permalink
Run long tests when needed (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
danejo3 authored Sep 22, 2022
1 parent 1eb9319 commit cee6f6d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for MEGAHIT (#13)
- Support for Unicycler (#14)
- Support for assembly configuration file (#16)
- Commands to run a short or long test suite (#20)


## [0.1] 2021-12-01
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ help: Makefile

## test: run automated test suite
test:
pytest --cov=yeat -m 'not long'

## testlong: run only long-running automated tests
testlong:
pytest --cov=yeat -m long

## testall: run all tests
testall:
pytest --cov=yeat

## style: check code style vs Black
Expand Down
3 changes: 3 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
markers =
long: long running tests
2 changes: 2 additions & 0 deletions yeat/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def test_invalid_read2_file():
cli.run(read1, read2, assemblers)


@pytest.mark.long
def test_multiple_assemblers(capsys, tmp_path):
wd = str(tmp_path)
arglist = [
Expand All @@ -77,6 +78,7 @@ def test_multiple_assemblers(capsys, tmp_path):
assert megahit_result.exists()


@pytest.mark.long
def test_unicycler(capsys, tmp_path):
wd = str(tmp_path)
arglist = [
Expand Down

0 comments on commit cee6f6d

Please sign in to comment.