Skip to content

Commit

Permalink
Fixed mangled name parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
boxed committed Oct 25, 2024
1 parent 7c066b4 commit d2cd591
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mutmut/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,12 +780,13 @@ def mangled_name_from_mutant_name(mutant_name):

def orig_function_and_class_names_from_key(mutant_name):
r = mangled_name_from_mutant_name(mutant_name)
_, _, r = r.rpartition('.')
class_name = None
if CLASS_NAME_SEPARATOR in r:
class_name = r[r.index(CLASS_NAME_SEPARATOR) + 1: r.rindex(CLASS_NAME_SEPARATOR)]
r = r[r.rindex(CLASS_NAME_SEPARATOR) + 1:]
else:
assert r.startswith('x_')
assert r.startswith('x_'), r
r = r[2:]
return r, class_name

Expand Down

0 comments on commit d2cd591

Please sign in to comment.