Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions mypy/test/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,13 @@ def pytest_addoption(parser: Any) -> None:
)


def pytest_configure(config: pytest.Config) -> None:
if config.getoption("--update-data") and config.getoption("--numprocesses", default=1) > 1:
raise pytest.UsageError(
"--update-data incompatible with parallelized tests; re-run with -n 1"
)


# This function name is special to pytest. See
# https://doc.pytest.org/en/latest/how-to/writing_plugins.html#collection-hooks
def pytest_pycollect_makeitem(collector: Any, name: str, obj: object) -> Any | None:
Expand Down