summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_descr.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index f20f676..fca0061 100644
--- a/Lib/test/test_descr.py
+++ b/Lib/test/test_descr.py
@@ -1085,6 +1085,13 @@ def slots():
raise TestFailed, "['foo\\0bar'] slots not caught"
try:
class C(object):
+ __slots__ = ["foo\u1234bar"]
+ except TypeError:
+ pass
+ else:
+ raise TestFailed, "['foo\\u1234bar'] slots not caught"
+ try:
+ class C(object):
__slots__ = ["1"]
except TypeError:
pass