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:
Éric Araujo 2011-10-05 01:50:22 +02:00
parent c4637714b0
commit 4300f69afd
1 changed files with 1 additions and 2 deletions

View File

@ -187,8 +187,7 @@ def get_attribute(obj, name):
try:
attribute = getattr(obj, name)
except AttributeError:
raise unittest.SkipTest("module %s has no attribute %s" % (
repr(obj), name))
raise unittest.SkipTest("object %r has no attribute %r" % (obj, name))
else:
return attribute