Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for Pytest 8 compat #17066

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 1 addition & 3 deletions mypy/test/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,7 @@ def pytest_pycollect_makeitem(collector: Any, name: str, obj: object) -> Any | N
# Non-None result means this obj is a test case.
# The collect method of the returned DataSuiteCollector instance will be called later,
# with self.obj being obj.
return DataSuiteCollector.from_parent( # type: ignore[no-untyped-call]
parent=collector, name=name
)
return DataSuiteCollector.from_parent(parent=collector, name=name)
return None


Expand Down
2 changes: 1 addition & 1 deletion mypy/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def run_mypy(args: list[str]) -> None:
if status != 0:
sys.stdout.write(outval)
sys.stderr.write(errval)
pytest.fail(msg="Sample check failed", pytrace=False)
pytest.fail(reason="Sample check failed", pytrace=False)


def diff_ranges(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ extra-standard-library = ["typing_extensions"]
ignore = ["**/.readthedocs.yaml"]

[tool.pytest.ini_options]
minversion = "6.0.0"
minversion = "7.0.0"
testpaths = ["mypy/test", "mypyc/test"]
python_files = 'test*.py'

Expand Down
2 changes: 1 addition & 1 deletion test-requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lxml>=4.9.1,<4.9.3; (python_version<'3.11' or sys_platform!='win32') and python_
pre-commit
pre-commit-hooks==4.5.0
psutil>=4.0
pytest>=7.4.0
pytest>=8.1.0
pytest-xdist>=1.34.0
pytest-cov>=2.10.0
ruff==0.2.0 # must match version in .pre-commit-config.yaml
Expand Down
4 changes: 2 additions & 2 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ platformdirs==3.11.0
# via
# black
# virtualenv
pluggy==1.3.0
pluggy==1.4.0
# via pytest
pre-commit==3.5.0
# via -r test-requirements.in
pre-commit-hooks==4.5.0
# via -r test-requirements.in
psutil==5.9.6
# via -r test-requirements.in
pytest==7.4.2
pytest==8.1.1
# via
# -r test-requirements.in
# pytest-cov
Expand Down
Loading