python / python/cpython

Remove (or integrate to CI/pyperformance) Module/_decimal/tests

Abierto
#149,755 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

3.16 extension-modules tests type-feature
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

This is a follow-up of #115119.

The bench.py script already partially integrated to the pyperformance, see https://github.com/python/pyperformance/issues/473.

The Modules/_decimal/tests/deccheck.py currently is broken. Even with the patch

diff --git a/Modules/_decimal/tests/deccheck.py b/Modules/_decimal/tests/deccheck.py
index bf277dd6879..b276700bc01 100644
--- a/Modules/_decimal/tests/deccheck.py
+++ b/Modules/_decimal/tests/deccheck.py
@@ -53,6 +53,8 @@
 from formathelper import rand_format, rand_locale
 from _pydecimal import _dec_from_triple
 
+sys.set_int_max_str_digits(0)
+
 C = import_fresh_module('decimal', fresh=['_decimal'])
 P = import_fresh_module('decimal', blocked=['_decimal'])
 EXIT_STATUS = 0

I still got

$ ./python Modules/_decimal/tests/deccheck.py --short


Random seed: 1778644369


testing __abs__ ...
    prec: 3  emin: -3  emax: 3
[...]
testing __hash__ ...
    prec: 3  emin: -3  emax: 3
Traceback (most recent call last):
  [...]
  File "/home/sk/src/cpython/Modules/_decimal/tests/deccheck.py", line 570, in skip_error
    return getattr(shandler, t.funcname, shandler.default)(t)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not callable

Probably these tests now are partially overlap with the CI tests. I think we should investigate this and merge tests or just run deccheck.py as part of CPython test suite.

Linked PRs
  • gh-155198
  • gh-155261

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.

Línea de trabajo

Empieza con Modules/_decimal/tests/deccheck.py y reproduce el fallo mostrado de ./python Modules/_decimal/tests/deccheck.py --short. Compara estas pruebas con las pruebas de CI que se solapan y con la integración parcial de pyperformance mencionada en issue #473. Se considera terminado cuando se haya resuelto el solapamiento y deccheck.py se haya integrado en el flujo de pruebas o se haya eliminado.

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

Evaluación

Stack tecnológico
python
Área
ci-cd, testing-qa
Tipo de issue
Refactorización
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.