summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/class2.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/class2.py')
-rw-r--r--tests/basics/class2.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/class2.py b/tests/basics/class2.py
index 64f1f62b96..8ab3ef2b35 100644
--- a/tests/basics/class2.py
+++ b/tests/basics/class2.py
@@ -15,3 +15,12 @@ class C2:
c2 = C2(4)
print(type(c2) == C2)
print(c2.x)
+
+# __init__ should return None
+class C3:
+ def __init__(self):
+ return 10
+try:
+ C3()
+except TypeError:
+ print('TypeError')