Skip to content

Commit c3df627

Browse files
committed
WIP
1 parent 77928e8 commit c3df627

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/mutmut/file_mutation.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from mutmut.trampoline_templates import create_trampoline_lookup, mangle_function_name, trampoline_impl
1111
from mutmut.node_mutation import mutation_operators, OPERATORS_TYPE
1212

13-
NEVER_MUTATE_FUNCTION_NAMES = { "__getattribute__", "__setattr__", "__new__", "__init__" }
13+
NEVER_MUTATE_FUNCTION_NAMES = { "__getattribute__", "__setattr__", "__new__"}
1414
NEVER_MUTATE_FUNCTION_CALLS = { "len", "isinstance" }
1515

1616
@dataclass
@@ -158,10 +158,6 @@ def _skip_node_and_children(self, node: cst.CSTNode):
158158
if isinstance(node, (cst.FunctionDef, cst.ClassDef)) and len(node.decorators):
159159
return True
160160

161-
if isinstance(node, cst.ClassDef):
162-
# TODO: do not skip classes for type checking
163-
return True
164-
165161
return False
166162

167163

tests/e2e/test_e2e_type_checking.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ def test_type_checking_result_snapshot():
1313
"type_checking.x_hello__mutmut_4": 1,
1414
"type_checking.x_a_hello_wrapper__mutmut_1": 6,
1515
"type_checking.x_a_hello_wrapper__mutmut_2": 0,
16+
"type_checking.xǁPersonǁset_name__mutmut_1": 1,
1617
"type_checking.x_mutate_me__mutmut_1": 6,
1718
"type_checking.x_mutate_me__mutmut_2": 6,
18-
"type_checking.x_mutate_me__mutmut_3": 1,
19-
"type_checking.x_mutate_me__mutmut_4": 1,
19+
"type_checking.x_mutate_me__mutmut_3": 6,
20+
"type_checking.x_mutate_me__mutmut_4": 6,
2021
"type_checking.x_mutate_me__mutmut_5": 6,
2122
}
2223
}

0 commit comments

Comments
 (0)