[Python-checkins] cpython: Update skip message printed by test.support.get_attribute.

eric.araujo python-checkins at python.org
Thu Oct 6 13:24:09 CEST 2011


http://hg.python.org/cpython/rev/472ee6ed7949
changeset:   72733:472ee6ed7949
user:        Éric Araujo <merwok at netwok.org>
date:        Wed Oct 05 01:50:22 2011 +0200
summary:
  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.

files:
  Lib/test/support.py |  3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)


diff --git a/Lib/test/support.py b/Lib/test/support.py
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -187,8 +187,7 @@
     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
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list