[Python-checkins] cpython: Always use repr for regrtest resources names
eric.araujo
python-checkins at python.org
Fri Jul 15 17:55:01 CEST 2011
http://hg.python.org/cpython/rev/cdb0ae616d58
changeset: 71343:cdb0ae616d58
user: Éric Araujo <merwok at netwok.org>
date: Fri Jul 15 17:50:15 2011 +0200
summary:
Always use repr for regrtest resources names
files:
Lib/test/support.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Lib/test/support.py b/Lib/test/support.py
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -289,7 +289,7 @@
return
if not is_resource_enabled(resource):
if msg is None:
- msg = "Use of the `%s' resource not enabled" % resource
+ msg = "Use of the %r resource not enabled" % resource
raise ResourceDenied(msg)
def requires_linux_version(*min_version):
@@ -665,7 +665,7 @@
f = check_valid_file(fn)
if f is not None:
return f
- raise TestFailed('invalid resource "%s"' % fn)
+ raise TestFailed('invalid resource %r' % fn)
class WarningsRecorder(object):
@@ -916,7 +916,7 @@
('WSANO_DATA', 11004),
]
- denied = ResourceDenied("Resource '%s' is not available" % resource_name)
+ denied = ResourceDenied("Resource %r is not available" % resource_name)
captured_errnos = errnos
gai_errnos = []
if not captured_errnos:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list