Skip to content

Commit ebb04a3

Browse files
ngoldbaumjonathanunderwood
authored andcommitted
suppress warnings when pytest-run-parallel isn't available
1 parent c5c5130 commit ebb04a3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/conftest.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
try:
2+
import pytest_run_parallel # noqa: F401
3+
PARALLEL_RUN_AVALIABLE = True
4+
except ModuleNotFoundError:
5+
PARALLEL_RUN_AVALIABLE = False
6+
7+
8+
def pytest_configure(config):
9+
if not PARALLEL_RUN_AVALIABLE:
10+
config.addinivalue_line(
11+
"markers",
12+
"thread_unsafe: mark the test function as single-threaded",
13+
)

0 commit comments

Comments
 (0)