summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-07-26 21:22:44 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-07-26 21:25:22 -0400
commit07c3c5dbf5bc3ebe22855fd77a388f12a0bec066 (patch)
treef60c635bf03a1eb37b1388ec70b2de5cc59ba37c /tests
parent4e0f1e1be25b38404b9f1481c1b2076949ed0613 (diff)
downloadpython-coveragepy-git-07c3c5dbf5bc3ebe22855fd77a388f12a0bec066.tar.gz
Don't be fooled by a class named test_something. Fixes #829
Diffstat (limited to 'tests')
-rw-r--r--tests/test_context.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_context.py b/tests/test_context.py
index 5d40e339..21d29a0c 100644
--- a/tests/test_context.py
+++ b/tests/test_context.py
@@ -285,3 +285,8 @@ class QualnameTest(CoverageTest):
self.skipTest("Old-style classes are only in Python 2")
self.assertEqual(OldStyle().meth(), "tests.test_context.OldStyle.meth")
self.assertEqual(OldChild().meth(), "tests.test_context.OldStyle.meth")
+
+ def test_bug_829(self):
+ # A class with a name like a function shouldn't confuse qualname_from_frame.
+ class test_something(object):
+ self.assertEqual(get_qualname(), None)