diff --git a/mutmut/__main__.py b/mutmut/__main__.py index 1d908b52..a328f5a5 100644 --- a/mutmut/__main__.py +++ b/mutmut/__main__.py @@ -137,7 +137,8 @@ def record_trampoline_hit(name): f = inspect.currentframe() c = mutmut.config.max_stack_depth while c and f: - if 'pytest' in f.f_code.co_filename or 'hammett' in f.f_code.co_filename: + filename = f.f_code.co_filename + if 'pytest' in filename or 'hammett' in filename or 'unittest' in filename: break f = f.f_back c -= 1