Author: Colin Valliant <[email protected]>
Branch: pep526
Changeset: r93925:37e249a9c04b
Date: 2018-02-14 22:53 -0800
http://bitbucket.org/pypy/pypy/changeset/37e249a9c04b/
Log: Add test to ensure repeated calls to SETUP_ANNOTATIONS work.
diff --git a/pypy/interpreter/test/test_annotations.py
b/pypy/interpreter/test/test_annotations.py
--- a/pypy/interpreter/test/test_annotations.py
+++ b/pypy/interpreter/test/test_annotations.py
@@ -69,6 +69,14 @@
C()
'''
+ def test_repeated_setup(self):
+ '''
+ d = {}
+ exec('a: int', d)
+ exec('b: int', d)
+ exec('assert __annotations__ == {"a": int, "b": int}', d)
+ '''
+
def test_function_no___annotations__(self):
'''
a: int
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit