summaryrefslogtreecommitdiff
path: root/Lib/test/test_class.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-11-08 06:46:49 +0000
committerMartin v. Löwis <martin@v.loewis.de>2006-11-08 06:46:49 +0000
commita1e3422205333a15c8f90c09c0883cf5e5139145 (patch)
treeae9d3236f0482c6a1dd4000ff89459bd79155600 /Lib/test/test_class.py
parentcf1e760d3e91977f64336890d3dd0aa898b7fa25 (diff)
downloadcpython-git-a1e3422205333a15c8f90c09c0883cf5e5139145.tar.gz
Correctly forward exception in instance_contains().
Fixes #1591996. Patch contributed by Neal Norwitz.
Diffstat (limited to 'Lib/test/test_class.py')
-rw-r--r--Lib/test/test_class.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index 6c91deb129..26b8e7a134 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -172,6 +172,14 @@ testme ^ 1
# List/dict operations
+class Empty: pass
+
+try:
+ 1 in Empty()
+ print 'failed, should have raised TypeError'
+except TypeError:
+ pass
+
1 in testme
testme[1]