Skip to content

Commit 308b170

Browse files
inesadrianeboyd
authored andcommitted
Allow conftest.py to run twice for build envs
1 parent 3420506 commit 308b170

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

spacy/tests/conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33

44

55
def pytest_addoption(parser):
6-
parser.addoption("--slow", action="store_true", help="include slow tests")
6+
try:
7+
parser.addoption("--slow", action="store_true", help="include slow tests")
8+
parser.addoption("--issue", action="store", help="test specific issues")
9+
# Options are already added, e.g. if conftest is copied in a build pipeline
10+
# and runs twice
11+
except ValueError:
12+
pass
713

814

915
def pytest_runtest_setup(item):

0 commit comments

Comments
 (0)