mutmut run bombs out during initial test run

Abierto
#485 8 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

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
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

Reproduce el fallo con mutmut 3.5.0, la configuración mostrada y python -m pytest -vv -x -q --rootdir=.; compáralo con una ejecución normal de pytest test. Rastrea si los mutantes están activos durante la ejecución inicial de las pruebas y cómo se informa del fallo de aserción de ScanTriggerType. Done debe explicar la fase que falla y proporcionar diagnósticos prácticos para el usuario.

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

Descripción

Using "mutmut run" with 3.5.0 and config:

[mutmut]
paths_to_mutate=src/my_project
mutate_only_covered_lines=false
debug = true

does the following:

....
⠙ Running stats     python -m pytest  -vv -x -q --rootdir=.
....
platform linux -- Python 3.10.19, pytest-9.0.2, pluggy-1.6.0
cachedir: .pytest_cache
rootdir: <redacted>/mutants
configfile: setup.cfg
testpaths: test
......
<lots of passed tests until one fails>
E           AssertionError: xǁScanTriggerTypeǁis_rescan_trigger__mutmut_mutants must be either event or rescan, not both or neither. is_event=False, is_rescan=False
E           assert (False ^ False)

Normal "pytest test" runs just fine, the test does NOT have a bug in it and passes normally without mutmut.

This is triggering an area where in one of our tests, we assert that a value is one of a few options... but somehow mutmut is changing this value, seeing the test fail, and then just stopping? ScanTriggerType is an enum.

It seems like it's applying mutants to the initial run of pytest that's supposed to just verify the tests work, or it's failing to catch asserts on tests once it's validating mutants?

The biggest issue here though is that the output doesn't tell me anything. As a first time user, I have no idea why this is failing, what stage it's in, no tips for what might be wrong, no debug output about what mutmut is doing from step to step, etc...

Lenguaje dominante
Python
Estrellas
1.5k
Forks
190
Merge medio
1 d 11 h
PR fusionados (30 d)
8

Preparar el entorno

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 boxed/mutmut

Todos los issues de boxed/mutmut

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.