[dev] wrong-version version tests disappear completely, but should probably skip instead
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 20.6k
- Forks
- 3.3k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne in /mypy/test/testparse.py und untersuche, wie parse-python314.test und check-python314.test ausgewählt werden, wenn testTemplateString unter Python-Versionen vor 3.14 ausgeführt wird. Führe den bereitgestellten runtests.py-Befehl aus, um das Ergebnis mit null ausgewählten Tests zu reproduzieren. Erledigt ist die Aufgabe, wenn der für die Version nicht anwendbare Test als übersprungen gemeldet wird, statt zu verschwinden, und die relevanten Tests auf unterstützten Versionen weiterhin korrekt funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- testing-qa
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100