Don't run importlib tests for the "source" version

Abierto
#92,328 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
testing-qa

Línea de trabajo

Comienza con la configuración de pruebas de importlib en Lib/test/test_importlib/test_api.py alrededor de las líneas 97-99; después revisa las rutas de pruebas de origen y frozen, así como el problema descrito en #92265. Determina qué cobertura proporcionan las pruebas de la versión de origen; se considera terminado cuando se documente la justificación y se realice el cambio en la suite de pruebas solo si esa cobertura no es necesaria.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

tests topic-importlib type-feature

Feature or enhancement

Simplify the test suite by not running the importlib tests on the source version, only the frozen one.

Pitch

Currently, we are running the tests against both the source and frozen versions of importlib.

Example:
https://github.com/python/cpython/blob/main/Lib/test/test_importlib/test_api.py#L97-L99

In #92265, we ran into a non-trivial issue where the frozen finders were leaking into source version of the tests, and I suspect some other tests might have the same issue. Me and @ericsnowcurrently spent quite a bit of time tracking it down, though I acknowledge it could have been easier for someone like Brett, who is more versed in this part of the code.

AFAICT, the only version of the modules users will actually use is the frozen one, making me question if the increased complexity in the test suite is worth it. I am under the impression that this was not always the case, which would explain a bit better why we are testing both versions.

So, would it be reasonable to simply remove the source version of the tests? What value is it actually providing? Did I overlook something here?

cc @brettcannon @ericsnowcurrently @warsaw

Lenguaje dominante
Python
Estrellas
77.2k
Forks
36k
Merge medio
1 d 9 h
PR fusionados (30 d)
558

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python/cpython

Todos los issues de python/cpython

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.