Skip to content

Commit

Permalink
mark pytest_examples as thread unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Feb 6, 2025
1 parent 7bd36e7 commit b8e1006
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def find_examples(*_directories):

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

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

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

0 comments on commit b8e1006

Please sign in to comment.