mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
Add n kwarg being ignored workaround
This commit is contained in:
parent
706097db21
commit
1aa72d7e7e
4 changed files with 208 additions and 4 deletions
23
atroposlib/tests/conftest.py
Normal file
23
atroposlib/tests/conftest.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import pytest
|
||||
|
||||
|
||||
def pytest_addoption(parser):
|
||||
parser.addoption(
|
||||
"--runproviders", action="store_true", default=False, help="run provider tests"
|
||||
)
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
config.addinivalue_line(
|
||||
"markers", "providers: mark test as requires providers api keys to run"
|
||||
)
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
if config.getoption("--runproviders"):
|
||||
# --runproviders given in cli: do not skip slow tests
|
||||
return
|
||||
skip_providers = pytest.mark.skip(reason="need --runproviders option to run")
|
||||
for item in items:
|
||||
if "providers" in item.keywords:
|
||||
item.add_marker(skip_providers)
|
||||
Loading…
Add table
Add a link
Reference in a new issue