Skip to content

Conversation

@CyberiaResurrection
Copy link
Collaborator

As outlined in #435 , @Otto-AA stated that mutants being identical to the source code they're ostensibly mutating is a bug.

Again, I've tried to make the simplest, most tightly-focused, change I can think of to resolve the bug.

As at the status quo, operator_string took the prefix of the node's
value, trimming that off the rest to leave an approximation.

This worked well enough until some wombat (hi) fed in a regex
string consisting only of escape sequences and whitespace.  For
whatever reason, the node represented that value as r'(rest of text...)
which the status quo dutifully trimmed to (rest of text...).

As the two text strings didn't match, status quo dutifully let the
mutant through despite it being a no-op.

This commit adds an additional check to catch the _unmodified_ node
value being equal to the mutated node value, skipping those
candidate mutants.
@boxed boxed merged commit 3854494 into boxed:main Sep 9, 2025
5 checks passed
@boxed
Copy link
Owner

boxed commented Sep 9, 2025

Nice

@CyberiaResurrection
Copy link
Collaborator Author

Thanks for that @boxed.

@CyberiaResurrection CyberiaResurrection deleted the FixUnchangedStringMutants branch September 9, 2025 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants