Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No mutations when running with --use-coverage

See original GitHub issue

Steps to reproduce:

  1. In an empty directory, create the file with the following content:
def test_stuff():
    assert True
  1. Run pytest --cov to generate .coverage file.
  2. Run mutmut run --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

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

Vlad-Shcherbinacommented, Jan 23, 2019

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.

boxedcommented, Aug 31, 2019

That would be great!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found