Skip to content

mutmut run bombs out during initial test run #485

@liquidpele

Description

@liquidpele

Using "mutmut run" with 3.5.0 and config:

[mutmut]
paths_to_mutate=src/my_project
mutate_only_covered_lines=false
debug = true

does the following:

....
⠙ Running stats     python -m pytest  -vv -x -q --rootdir=.
....
platform linux -- Python 3.10.19, pytest-9.0.2, pluggy-1.6.0
cachedir: .pytest_cache
rootdir: <redacted>/mutants
configfile: setup.cfg
testpaths: test
......
<lots of passed tests until one fails>
E           AssertionError: xǁScanTriggerTypeǁis_rescan_trigger__mutmut_mutants must be either event or rescan, not both or neither. is_event=False, is_rescan=False
E           assert (False ^ False)

Normal "pytest test" runs just fine, the test does NOT have a bug in it and passes normally without mutmut.

This is triggering an area where in one of our tests, we assert that a value is one of a few options... but somehow mutmut is changing this value, seeing the test fail, and then just stopping? ScanTriggerType is an enum.

It seems like it's applying mutants to the initial run of pytest that's supposed to just verify the tests work, or it's failing to catch asserts on tests once it's validating mutants?

The biggest issue here though is that the output doesn't tell me anything. As a first time user, I have no idea why this is failing, what stage it's in, no tips for what might be wrong, no debug output about what mutmut is doing from step to step, etc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions