Allow conftest.py to run twice for build envs (#11978)

Co-authored-by: Ines Montani <ines@ines.io>
This commit is contained in:
Adriane Boyd 2022-12-15 10:03:19 +01:00 committed by GitHub
parent fe0bae9159
commit a5b6d92ea3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,13 @@ from spacy.util import get_lang_class
def pytest_addoption(parser): def pytest_addoption(parser):
parser.addoption("--slow", action="store_true", help="include slow tests") try:
parser.addoption("--slow", action="store_true", help="include slow tests")
parser.addoption("--issue", action="store", help="test specific issues")
# Options are already added, e.g. if conftest is copied in a build pipeline
# and runs twice
except ValueError:
pass
def pytest_runtest_setup(item): def pytest_runtest_setup(item):