Remove non-mutated code from sys.path #379
Merged
+16
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change should help troubleshooting errors, where the package setup in
./mutantsis not correct.Currently, when the tests in
./mutants/try to import a package that is not in./mutants/, it will also look in the original (non-mutated) source code. Is there ever a case, where this is desired? I would guess thatalso_copycovers these use cases, but I am not sure, so I wanted to ask for your opinion @boxed .The reason I want to prevent importing the original code is that it hides the error cause if the package setup of
./mutantsis wrong. If the package is not setup properly (e.g. #370 , which only has a single file forpaths_to_mutaterather than the whole source), the tests currently just use the original code and thus always pass. We only stop at the forced fail test.With these changes, it will already fail at the test collecting stage. If debug=true, we also have the error cause reported: