summaryrefslogtreecommitdiff
path: root/tests/test_context.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-10-06 16:55:18 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-10-06 16:55:18 -0400
commitf33b733e92a2422d64cb7f4ba2a64898e1e4f336 (patch)
treec6d3573dec9e42ee83e2739432419151e52b49fa /tests/test_context.py
parent19545b7d78fb91a82088517681e20cf4ffcd8c63 (diff)
downloadpython-coveragepy-git-f33b733e92a2422d64cb7f4ba2a64898e1e4f336.tar.gz
docs: note #1210 in the changelog
Diffstat (limited to 'tests/test_context.py')
-rw-r--r--tests/test_context.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_context.py b/tests/test_context.py
index de972819..36eff2f0 100644
--- a/tests/test_context.py
+++ b/tests/test_context.py
@@ -278,6 +278,8 @@ class QualnameTest(CoverageTest):
assert get_qualname() is None
def test_bug_1210(self):
+ # Under pyarmor (an obfuscator), a function can have a "self" argument,
+ # but then not have a "self" local.
co = mock.Mock(co_name="a_co_name", co_argcount=1, co_varnames=["self"])
- frame = mock.Mock(f_code = co, f_locals={})
+ frame = mock.Mock(f_code=co, f_locals={})
assert qualname_from_frame(frame) == "unittest.mock.a_co_name"