Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

mutmut 3.3.0 does not mutate decorated functions/methods

Aperta
#387 12 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
python
Ambito
testing-qa

Direzione di ricerca

Riproduci il report dal branch collegato python-sandpit mutmut-3.3.0 usando la configurazione paths_to_mutate mostrata e poetry run mutmut run. Confronta poetry run mutmut browse con mutmut-stats.json, iniziando dai file nella directory src di ciascun pacchetto. Il lavoro è completato quando il mutation testing tiene conto dei file configurati e delle funzioni o dei metodi decorati, anziché soltanto di fox_goose_corn/src/model/boat.py.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
1.5k
Fork
182
Merge medio
2g 14h
PR unite (30g)
3

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di boxed/mutmut

Tutte le issue di boxed/mutmut

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.