Skip to content

Commit b8e1006

Browse files
committed
mark pytest_examples as thread unsafe
1 parent 7bd36e7 commit b8e1006

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_docstrings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def find_examples(*_directories):
1414

1515
@pytest.mark.skipif(CodeExample is None or sys.platform not in {'linux', 'darwin'}, reason='Only on linux and macos')
1616
@pytest.mark.parametrize('example', find_examples('python/pydantic_core/core_schema.py'), ids=str)
17+
@pytest.mark.thread_unsafe # TODO investigate why pytest_examples seems to be thread unsafe here
1718
def test_docstrings(example: CodeExample, eval_example: EvalExample):
1819
eval_example.set_config(quotes='single')
1920

@@ -27,6 +28,7 @@ def test_docstrings(example: CodeExample, eval_example: EvalExample):
2728

2829
@pytest.mark.skipif(CodeExample is None or sys.platform not in {'linux', 'darwin'}, reason='Only on linux and macos')
2930
@pytest.mark.parametrize('example', find_examples('README.md'), ids=str)
31+
@pytest.mark.thread_unsafe # TODO investigate why pytest_examples seems to be thread unsafe here
3032
def test_readme(example: CodeExample, eval_example: EvalExample):
3133
eval_example.set_config(line_length=100, quotes='single')
3234
if eval_example.update_examples:

0 commit comments

Comments
 (0)