-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mutmut run leads to hardcoded error in 2.4.2 #258
Comments
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 |
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? |
Fwiw, using |
That might work for unittest, but it's not a general solution. mutmut doesn't know about what test framework you're using. |
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. |
Yea.. I'm fine with doing that also. |
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. |
split_paths
returnsNone
on https://github.com/boxed/mutmut/blob/master/mutmut/__main__.py#L278Iterating over
None
leads to an exception on https://github.com/boxed/mutmut/blob/master/mutmut/__main__.py#L293Replacing
None
with[]
on line 278 fixes this problem for me, but I'm not familiar enough with the code to understand what's really going on.The text was updated successfully, but these errors were encountered: