diff options
author | Guido van Rossum <guido@dropbox.com> | 2016-09-11 16:45:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@dropbox.com> | 2016-09-11 16:45:24 (GMT) |
commit | 015d8746261f23084d449ae9f382d7088ec7016f (patch) | |
tree | 54a689b42bfa979d7975f3006951d795a891b509 /Lib/test/test_grammar.py | |
parent | a6d75fdc37e4cbc49fe64420219f3b4da1b20cef (diff) | |
download | cpython-015d8746261f23084d449ae9f382d7088ec7016f.zip cpython-015d8746261f23084d449ae9f382d7088ec7016f.tar.gz cpython-015d8746261f23084d449ae9f382d7088ec7016f.tar.bz2 |
Issue #28076: Variable annotations should be mangled for private names.
By Ivan Levkivskyi.
Diffstat (limited to 'Lib/test/test_grammar.py')
-rw-r--r-- | Lib/test/test_grammar.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py index 914aa67..67a61d4 100644 --- a/Lib/test/test_grammar.py +++ b/Lib/test/test_grammar.py @@ -328,12 +328,12 @@ class GrammarTests(unittest.TestCase): # class semantics class C: - x: int + __foo: int s: str = "attr" z = 2 def __init__(self, x): self.x: int = x - self.assertEqual(C.__annotations__, {'x': int, 's': str}) + self.assertEqual(C.__annotations__, {'_C__foo': int, 's': str}) with self.assertRaises(NameError): class CBad: no_such_name_defined.attr: int = 0 |