Repository navigation
v0.2.0 — 5 New Mutation Operators
What's New
Five new mutation operator families, expanding pytest-leela's mutation coverage:
Bitwise Operators
- BitAnd (
&), BitOr (|), BitXor (^), LShift (<<), RShift (>>) - Includes type-aware pruning for int/bool operands
Augmented Assignments
- All 12 augmented assignment operators (
+=,-=,*=,/=,//=,%=,**=,&=,|=,^=,<<=,>>=) - Mutations swap between compatible operator families
Inline Conditionals (Ternary)
x if cond else y→y if cond else x(swap branches)x if cond else y→x(remove else)x if cond else y→y(remove if)
Break/Continue Swaps
break→continueandcontinue→breakinside loops
Exception Handler Mutations
- Broad exception handlers (
except Exception) → narrow (except RuntimeError) - Narrow handlers → broad handlers
- Equivalent mutant detection for single-exception handlers
Stats
- 386 tests passing
- Full self-mutation coverage
- Validated on real Django project (roaming-panda: 98.5%+ kill rate)