diff options
Diffstat (limited to 'tests/test_context.py')
-rw-r--r-- | tests/test_context.py | 4 |
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" |