diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-11-08 06:46:37 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-11-08 06:46:37 (GMT) |
commit | 3a62404264e02acbee83994c411e292bccd4e8f2 (patch) | |
tree | 8e08132ecc808512f0c00ddbca7b08a1fe41afe3 /Lib/test/test_class.py | |
parent | e452f51bc4bf444c82e7465ea841f8058389c1f9 (diff) | |
download | cpython-3a62404264e02acbee83994c411e292bccd4e8f2.zip cpython-3a62404264e02acbee83994c411e292bccd4e8f2.tar.gz cpython-3a62404264e02acbee83994c411e292bccd4e8f2.tar.bz2 |
Correctly forward exception in instance_contains().
Fixes #1591996. Patch contributed by Neal Norwitz.
Will backport.
Diffstat (limited to 'Lib/test/test_class.py')
-rw-r--r-- | Lib/test/test_class.py | 8 |
1 files changed, 8 insertions, 0 deletions
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 @@ 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] |