diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2746e..ca3f661 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/Makefile b/Makefile index 9a11d19..eb86578 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..d57c4e0 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,3 @@ +[pytest] +markers = + long: long running tests diff --git a/yeat/tests/test_cli.py b/yeat/tests/test_cli.py index ba3225f..bfd31bb 100644 --- a/yeat/tests/test_cli.py +++ b/yeat/tests/test_cli.py @@ -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 = [ @@ -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 = [