Comments (7)
Well there really shouldn't be any case where mutmut doesn't know where the tests are. That would break the logic that makes mutmut smart about what to rerun and not.
That being said, the hard crash like this isn't good. It would be better if it printed an error message saying it can't find the tests and ask you to add the required config in setup.cfg
from mutmut.
Does mutmut attempt to detect test directories? I see https://github.com/boxed/mutmut/blob/master/mutmut/__main__.py#L119 which only seems to find tests in the current directory. Would it not be preferable to use the standard unittest test discovery, if possible?
from mutmut.
Fwiw, using unittest.TestLoader().discover(path)
or something similar might be preferable to find test dirs. I could look into getting the directories from that.
from mutmut.
That might work for unittest, but it's not a general solution. mutmut doesn't know about what test framework you're using.
from mutmut.
Automatic discovery for some users still sounds like an improvement to me? Not sure if I should look into it any further though as it's not general, which doesn't seem possible anyway.
from mutmut.
Yea.. I'm fine with doing that also.
from mutmut.
Looks like the regression happened in 2.4.1 - a Dependabot PR which only updates mutmut 2.4.0 to 2.4.1 broke my project. Not sure what the workaround is.
from mutmut.
Related Issues (20)
- Pony throws IndexError on results command HOT 2
- 2.4.3 and 2.4.4 release are not tagged in repo
- Mutate str methods? HOT 1
- `mutmut show --all` flag
- Issue with mutmut mutation in presence of type hints HOT 16
- Invalid mutations involving positional-only and keyword-only arguments HOT 1
- Setting the --no-progress flag also removes output from a run.
- [Feature Request] Random Sampling of Mutations HOT 3
- Support new python's versions HOT 1
- TypeError: can only concatenate str (not "list") to str in mutmut 2.4.4 HOT 2
- --CI parameter HOT 5
- Use patch file on Windows never executes mutants
- Tests require the 'testdata' feature but it isn't listed in test_requirements.txt HOT 5
- Support mutating changed lines only HOT 7
- Release Request HOT 1
- Fails to skip lines when context.skip set True in pre_mutation HOT 3
- `mutmut show 0` shows a stacktrace for a ValueError
- Add support for `--test-file` to mimic `--test-dir` but for specific files. HOT 3
- Strange behaviour with dataclass mutation HOT 3
- Strange behaviour with multiple context managers. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mutmut.