mutmut 3.3.0 does not mutate decorated functions/methods

Abierto
#387 12 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Culaii ya está trabajando en esto.

Desde el 2/11/2026.

  • #620 de @Culaii — abierto
  • #623 de @Culaii — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python
Área
testing-qa

Línea de trabajo

Reproduce el informe de la rama vinculada python-sandpit mutmut-3.3.0 usando la configuración mostrada de paths_to_mutate y poetry run mutmut run. Compara poetry run mutmut browse con mutmut-stats.json, comenzando por los archivos de cada directorio src de los paquetes. Se considera terminado cuando las pruebas de mutación tienen en cuenta los archivos y las funciones o métodos decorados configurados, en lugar de solo fox_goose_corn/src/model/boat.py.

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

Descripción

It might be something about the way I am doing it, but I cannot get mutmut 3.3.0 to mutation test more than one files in this codebase/branch.

Directory structure is...

├── _starter_kit
│   ├── src
│   └── tests
├── fox_goose_corn
│   ├── src
│   └── tests
├── list_things
│   ├── src
│   └── tests
└── thing_rental
    ├── src
    └── tests

Relevant configuration is...

[tool.mutmut]
paths_to_mutate = [
    "_starter_kit/",
    "fox_goose_corn/",
    "list_things/",
    "thing_rental/"
]
do_not_mutate = [
    "**/tests/*"
]

[tool.pytest.ini_options]
addopts = "--ignore ./mutants"

The presence or not of --ignore ./mutants does not have any effect on the behaviour of mutmut, just stops pytest running tests in the mutmut directory if I fire it off from the root to run all tests.

Run mutmut gives...

➜ rm -rf mutants && poetry run mutmut run
⠦ Generating mutants
    done in 133ms
⠇ Running stats     
    done
⠋ Running clean tests
    done
⠏ Running forced fail test
    done
Running mutation testing
⠏ 9/9  🎉 9 🫥 0  ⏰ 0  🤔 0  🙁 0  🔇 0
90.25 mutations/second

poetry run mutmut browse only shows any action on fox_goose_corn/src/model/boat.py...

_starter_kit/__init__.py                                          0   0   0   0   0   0  0   0   0
_starter_kit/src/__init__.py                                      0   0   0   0   0   0  0   0   0
_starter_kit/src/thing.py                                         0   0   0   0   0   0  0   0   0
fox_goose_corn/__init__.py                                        0   0   0   0   0   0  0   0   0
fox_goose_corn/src/__init__.py                                    0   0   0   0   0   0  0   0   0
fox_goose_corn/src/crossing_manager.py                            0   0   0   0   0   0  0   0   0
fox_goose_corn/src/model/boat.py                                  0   0   0   0   0   0  0   9   0
fox_goose_corn/src/model/cargo_item.py                            0   0   0   0   0   0  0   0   0
fox_goose_corn/src/model/river.py                                 0   0   0   0   0   0  0   0   0
list_things/__init__.py                                           0   0   0   0   0   0  0   0   0
list_things/src/__init__.py                                       0   0   0   0   0   0  0   0   0
list_things/src/continuous_subset.py                              0   0   0   0   0   0  0   0   0
list_things/src/scattered_subset.py                               0   0   0   0   0   0  0   0   0
thing_rental/__init__.py                                          0   0   0   0   0   0  0   0   0
thing_rental/src/__init__.py                                      0   0   0   0   0   0  0   0   0
thing_rental/src/exceptions/__init__.py                           0   0   0   0   0   0  0   0   0
thing_rental/src/exceptions/person_already_renting_exception.py   0   0   0   0   0   0  0   0   0
thing_rental/src/exceptions/thing_already_rented_exception.py     0   0   0   0   0   0  0   0   0
thing_rental/src/model/__init__.py                                0   0   0   0   0   0  0   0   0
thing_rental/src/model/person.py                                  0   0   0   0   0   0  0   0   0
thing_rental/src/model/rental.py                                  0   0   0   0   0   0  0   0   0
thing_rental/src/model/thing.py                                   0   0   0   0   0   0  0   0   0
thing_rental/src/rental_service.py                                0   0   0   0   0   0  0   0   0

In case it helps, here is the mutmut-stats.json...

mutmut-stats.json

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.