]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update skip message printed by test.support.get_attribute.
authorÉric Araujo <merwok@netwok.org>
Tue, 4 Oct 2011 23:50:22 +0000 (01:50 +0200)
committerÉric Araujo <merwok@netwok.org>
Tue, 4 Oct 2011 23:50:22 +0000 (01:50 +0200)
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.

Lib/test/support.py

index 619bf4cb41657d53844c09e41503b0977a421404..556e82f4acf15d2a464d6c0eb4ff65b5e668b940 100644 (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