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.
This commit is contained in:
Barry Warsaw 2001-08-24 19:11:57 +00:00
parent 70d4491540
commit 191487351a
2 changed files with 8 additions and 4 deletions

View File

@ -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

View File

@ -152,8 +152,8 @@ finally:
'''
# Dummy translation for Python's test_gettext.py module.
# Copyright (C) 2000 BeOpen.com
# Barry Warsaw <bwarsaw@beopen.com>, 2000.
# Copyright (C) 2001 Python Software Foundation
# Barry Warsaw <barry@python.org>, 2000.
#
msgid ""
msgstr ""