diff options
author | Barry Warsaw <barry@python.org> | 2001-08-24 19:11:57 +0000 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-08-24 19:11:57 +0000 |
commit | 191487351abb5d2b7daf9d839ca2b3a3c7fdc07b (patch) | |
tree | 4c20adb2efe0d0dc21b6bc8937d1d09824a3e0d3 /Lib/test/test_extcall.py | |
parent | 70d449154046cf97af6b2c94d68ae12af4a965df (diff) | |
download | cpython-191487351abb5d2b7daf9d839ca2b3a3c7fdc07b.tar.gz cpython-191487351abb5d2b7daf9d839ca2b3a3c7fdc07b.zip |
Quick and dirty fix for test_extcall failures trigged by Guido's
recent classobject.c change. When calling an unbound method with no
instances as first argument, the error message has changed. The
message now contains the class name, but the output text being
compared to is too generic, so skip printing it.
Diffstat (limited to 'Lib/test/test_extcall.py')
-rw-r--r-- | Lib/test/test_extcall.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_extcall.py b/Lib/test/test_extcall.py index 9effac7585f..1e80387cf4a 100644 --- a/Lib/test/test_extcall.py +++ b/Lib/test/test_extcall.py @@ -191,11 +191,15 @@ print Foo.method(x, *(1, 2)) try: print Foo.method(*(1, 2, 3)) except TypeError, err: - print err + pass +else: + print 'expected a TypeError for unbound method call' try: print Foo.method(1, *(2, 3)) except TypeError, err: - print err + pass +else: + print 'expected a TypeError for unbound method call' # A PyCFunction that takes only positional parameters should allow an # empty keyword dictionary to pass without a complaint, but raise a |