Added fast tests.
This commit is contained in:
parent
8554ef8d81
commit
d48394a522
3 changed files with 45 additions and 20 deletions
17
tests/conftest.py
Normal file
17
tests/conftest.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--fast", action="store_true", help="Run only fast tests")
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
if config.getoption("--fast"):
|
||||
skip_slow = pytest.mark.skip(reason="Runs only without --fast option.")
|
||||
|
||||
for item in items:
|
||||
if "slow" in item.keywords:
|
||||
item.add_marker(skip_slow)
|
Loading…
Add table
Add a link
Reference in a new issue