commit | 3a62404264e02acbee83994c411e292bccd4e8f2 | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Wed Nov 08 06:46:37 2006 +0000 |
committer | Martin v. Löwis <martin@v.loewis.de> | Wed Nov 08 06:46:37 2006 +0000 |
tree | 8e08132ecc808512f0c00ddbca7b08a1fe41afe3 | |
parent | e452f51bc4bf444c82e7465ea841f8058389c1f9 [diff] [blame] |
Correctly forward exception in instance_contains(). Fixes #1591996. Patch contributed by Neal Norwitz. Will backport.
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]