commit | a1e3422205333a15c8f90c09c0883cf5e5139145 | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Wed Nov 08 06:46:49 2006 +0000 |
committer | Martin v. Löwis <martin@v.loewis.de> | Wed Nov 08 06:46:49 2006 +0000 |
tree | ae9d3236f0482c6a1dd4000ff89459bd79155600 | |
parent | cf1e760d3e91977f64336890d3dd0aa898b7fa25 [diff] [blame] |
Correctly forward exception in instance_contains(). Fixes #1591996. Patch contributed by Neal Norwitz.
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index 6c91deb..26b8e7a 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py
@@ -172,6 +172,14 @@ # List/dict operations +class Empty: pass + +try: + 1 in Empty() + print 'failed, should have raised TypeError' +except TypeError: + pass + 1 in testme testme[1]