Skip to content

[dev] wrong-version version tests disappear completely, but should probably skip instead #20398

@wyattscarpenter

Description

@wyattscarpenter

Consider the following:

uv run runtests.py testTemplateString usage: runtests.py [self] [self-packaging] [lint] [pytest-fast] [pytest-cmdline] [pytest-slow] [mypyc-fast] [pytest-extra] [mypyc-extra] [names of individual tests and files...] Run the given tests. If given no arguments, run everything except pytest-extra and mypyc-extra. Unrecognized arguments will be interpreted as individual test names / substring expressions (or, if they end in .test, individual test files) and this script will try to run them. run testTemplateString: ['pytest', '-n0', '-k', 'testTemplateString'] ========================================================================================================== test session starts =========================================================================================================== platform win32 -- Python 3.13.7, pytest-8.4.2, pluggy-1.6.0 rootdir: C:\Users\wyatt\files\gits\wyattscarpenter\cfork\mypy configfile: pyproject.toml testpaths: mypy/test, mypyc/test plugins: cov-7.0.0, xdist-3.8.0 collected 13431 items / 13431 deselected / 0 selected ======================================================================================================= 13431 deselected in 1.78s ======================================================================================================== FAILED: testTemplateString 

This is a real test, in parse-python314.test (and also, oddly enough, in check-python314.test — not sure what's up with that) but, apparently, because my python version is <3.14, it disappears. It should probably pytest skip instead (yellow "s" on the list of results), that seems like the correct result semantically, and is less mysterious than the test just not being there.

A good place to start investigating this change might be /mypy/test/testparse.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions