No mutations when running with --use-coverage
See original GitHub issueSteps to reproduce:
- In an empty directory, create the file
example_test.py
with the following content:
def test_stuff():
assert True
- Run
pytest --cov
to generate.coverage
file. - Run
mutmut run --paths-to-mutate=example_test.py --use-coverage
.
Expected result: 1 killed mutant (I tried running mutmut without --use-coverage
and there was indeed 1 mutant; and coverage html
shows that that line is covered).
Actual result: no mutants whatsoever.
1. Running tests without mutations
⠇ Running... Done
Using coverage data from .coverage file
2. Checking mutants
⠏ 0/0 🎉 0 ⏰ 0 🤔 0 🙁 0
Version info:
Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32
pytest==4.1.1
pytest-cov==2.6.1
mutmut==1.2.0
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
mutmut - python mutation tester — mutmut documentation
Can use coverage data to only do mutation testing on covered lines ... You can stop the mutation run at any time and...
Read more >Getting Error while running Mutation testing on Python code ...
Unit testing is passed and when I run the Mutation testing on command ... Not sure if it is what you asked, but...
Read more >Mutmut - Ned Batchelder
Mutmut has a --use-coverage flag, which uses coverage data to skip mutations on lines that are not covered by the test suite. If...
Read more >Covering and Uncovering Equivalent Mutants - Schuler - 2013
Use coverage data. Not all tests in the test suite execute every mutant. In order to avoid executing those tests, we collect coverage ......
Read more >Practical Mutation Testing at Scale - arXiv
traditional approach to mutation testing does not scale to such an environment; ... Code coverage is a prerequisite for running mutation.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you, I confirm it works with mutmut 1.3.0.
I know it’s pathological, I was going for the simplest way to reproduce.
That would be great!