mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Update skip message printed by test.support.get_attribute.
This helper was changed to work with any object instead of only modules (or technically something with a __name__ attribute, see code in 3.2) but the message stayed as is.
This commit is contained in:
parent
c4637714b0
commit
4300f69afd
1 changed files with 1 additions and 2 deletions
|
@ -187,8 +187,7 @@ def get_attribute(obj, name):
|
||||||
try:
|
try:
|
||||||
attribute = getattr(obj, name)
|
attribute = getattr(obj, name)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise unittest.SkipTest("module %s has no attribute %s" % (
|
raise unittest.SkipTest("object %r has no attribute %r" % (obj, name))
|
||||||
repr(obj), name))
|
|
||||||
else:
|
else:
|
||||||
return attribute
|
return attribute
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue