diff options
author | Albertas Agejevas <alga@pov.lt> | 2019-01-24 09:33:23 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-06-10 17:15:32 -0400 |
commit | 368676b837045636141238ac295ac302e099611a (patch) | |
tree | 732d3ddf46ab39ff8c0a33067aa80dcc768ef4f8 /coverage/context.py | |
parent | 47d6f8a064ee7da6c2a2dd288c197b58b942a75e (diff) | |
download | python-coveragepy-git-368676b837045636141238ac295ac302e099611a.tar.gz |
Handle TestCase classes with just one test, too.
Diffstat (limited to 'coverage/context.py')
-rw-r--r-- | coverage/context.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coverage/context.py b/coverage/context.py index 9ef680a3..fb1b76ac 100644 --- a/coverage/context.py +++ b/coverage/context.py @@ -36,7 +36,8 @@ def combine_context_switchers(context_switchers): def should_start_context_test_function(frame): """Is this frame calling a test_* function?""" - if frame.f_code.co_name.startswith("test"): + co_name = frame.f_code.co_name + if co_name.startswith("test") or co_name == "runTest": return qualname_from_frame(frame) return None |