question-mark
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.

Can I prevent mutants which mypy kills?

See original GitHub issue

I have many “false” surviving mutants like this one:

image

This mutant would be killed by mypy in the CI pipeline. However, it survives as I only run pytest -m "not slow" -x and pytest -m "not slow " && mypy app/ does not work. I’ve also tried pytest -m "not slow" --mypy -x, but that runs mypy over the tests as well which fails / makes each run pretty slow.

Do you have any suggestions what I could do?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
MartinThomacommented, Dec 9, 2020

@boxed I think I’ve heard you mention this on a podcast recently. I need to remember that one in future 😄 (btw: Thank you for talking about it in a podcast / putting that much time and effort in Open Source projects ❤️ )

2reactions
boxedcommented, Dec 9, 2020

@pedernot you should absolutely add -x to the pytest call. There is no need to run any more tests if a test has already failed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

More powerful whitelisting system · Issue #47 · boxed/mutmut
I can't help but feel that needing to achieve 100% killed mutants will always be an endless game of whack-a-mole that isn't worth...
Read more >
Mutmut - Ned Batchelder
I thought that mutmut run again would clear the mutant from the results, but the only way I could find to clear it...
Read more >
Using Type Analysis for Dealing with Incompetent Mutants in ...
Abstract: Mutation testing of dynamically typed languages, such as Python, raises problems in mutant introduction and evaluation of mutant execution results ...
Read more >
How Good are Your Types? - Oregon State University
and the Python type checker Mypy [34]. For twitter-graph, we measured the number of mutants killed by the type checker over a range...
Read more >
python/typing - Gitter
Mutants undetected by the test suite show which parts of code need better tests, and the more mutants are "killed", the better the...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found