[dev] wrong-version version tests disappear completely, but should probably skip instead
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Python
- Estrellas
- 20.6k
- Forks
- 3.3k
- Merge medio
- 1 d 18 h
- PR fusionados (30 d)
- 54
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza en /mypy/test/testparse.py e inspecciona cómo se seleccionan parse-python314.test y check-python314.test al ejecutar testTemplateString en versiones de Python anteriores a la 3.14. Ejecuta el comando runtests.py proporcionado para reproducir el resultado de cero tests seleccionados. La tarea estará terminada cuando el test no aplicable a la versión se informe como omitido en lugar de desaparecer, y los tests relevantes sigan comportándose correctamente en las versiones compatibles.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- testing-qa
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100