@@ -189,18 +189,18 @@ def _mutmut_trampoline(orig, mutants, *args, **kwargs):
189189 elif mutant_under_test == 'stats':
190190 from mutmut.__main__ import record_trampoline_hit
191191 record_trampoline_hit(orig.__module__ + '.' + orig.__name__)
192- ret orig(*args, **kwargs)
193- return # for the yield case
192+ result = orig(*args, **kwargs)
193+ return result # for the yield case
194194 prefix = orig.__module__ + '.' + orig.__name__ + '__mutmut_'
195195 if not mutant_under_test.startswith(prefix):
196- ret orig(*args, **kwargs)
197- return # for the yield case
196+ result = orig(*args, **kwargs)
197+ return result # for the yield case
198198 mutant_name = mutant_under_test.rpartition('.')[-1]
199- ret mutants[mutant_name](*args, **kwargs)
199+ result = mutants[mutant_name](*args, **kwargs)
200+ return result
200201
201202"""
202- yield_from_trampoline_impl = trampoline_impl .replace ('ret ' , 'yield from ' ).replace ('_mutmut_trampoline' , '_mutmut_yield_from_trampoline' )
203- trampoline_impl = trampoline_impl .replace ('ret ' , 'return ' )
203+ yield_from_trampoline_impl = trampoline_impl .replace ('result = ' , 'result = yield from ' ).replace ('_mutmut_trampoline' , '_mutmut_yield_from_trampoline' )
204204
205205
206206def create_mutants ():
0 commit comments