diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2006-11-08 06:46:49 (GMT) | 
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2006-11-08 06:46:49 (GMT) | 
| commit | a1e3422205333a15c8f90c09c0883cf5e5139145 (patch) | |
| tree | ae9d3236f0482c6a1dd4000ff89459bd79155600 /Lib/test/test_class.py | |
| parent | cf1e760d3e91977f64336890d3dd0aa898b7fa25 (diff) | |
| download | cpython-a1e3422205333a15c8f90c09c0883cf5e5139145.zip cpython-a1e3422205333a15c8f90c09c0883cf5e5139145.tar.gz cpython-a1e3422205333a15c8f90c09c0883cf5e5139145.tar.bz2  | |
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.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]  | 
