mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Don't be so strict in checking AttributeError -- the error message
recently changed.
This commit is contained in:
parent
547e952017
commit
4b49101f20
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ class Nothing: pass
|
||||||
try:
|
try:
|
||||||
g(*Nothing())
|
g(*Nothing())
|
||||||
except AttributeError, attr:
|
except AttributeError, attr:
|
||||||
assert attr[0] == '__len__'
|
pass
|
||||||
else:
|
else:
|
||||||
print "should raise AttributeError: __len__"
|
print "should raise AttributeError: __len__"
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class Nothing:
|
||||||
try:
|
try:
|
||||||
g(*Nothing())
|
g(*Nothing())
|
||||||
except AttributeError, attr:
|
except AttributeError, attr:
|
||||||
assert attr[0] == '__getitem__'
|
pass
|
||||||
else:
|
else:
|
||||||
print "should raise AttributeError: __getitem__"
|
print "should raise AttributeError: __getitem__"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue