summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_locale.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-29 23:37:32 (GMT)
committerCollin Winter <collinw@gmail.com>2007-08-29 23:37:32 (GMT)
commit3add4d78ff9f5de02e2c0de09efe9a9b5317539f (patch)
treec61c6a122b33537814bcc643300f10759fa81010 /Lib/test/test_locale.py
parente0281cab810c30a23cf2490704e0f85aa4751e83 (diff)
downloadcpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.zip
cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.gz
cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.bz2
Raise statement normalization in Lib/test/.
Diffstat (limited to 'Lib/test/test_locale.py')
-rw-r--r--Lib/test/test_locale.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py
index 2dd6510..1bfb3b3 100644
--- a/Lib/test/test_locale.py
+++ b/Lib/test/test_locale.py
@@ -3,7 +3,8 @@ import locale
import sys
if sys.platform == 'darwin':
- raise TestSkipped("Locale support on MacOSX is minimal and cannot be tested")
+ raise TestSkipped(
+ "Locale support on MacOSX is minimal and cannot be tested")
oldlocale = locale.setlocale(locale.LC_NUMERIC)
if sys.platform.startswith("win"):
@@ -18,20 +19,22 @@ for tloc in tlocs:
except locale.Error:
continue
else:
- raise ImportError, "test locale not supported (tried %s)"%(', '.join(tlocs))
+ raise ImportError(
+ "test locale not supported (tried %s)" % (', '.join(tlocs)))
def testformat(formatstr, value, grouping = 0, output=None, func=locale.format):
if verbose:
if output:
- print("%s %% %s =? %s ..." %\
- (repr(formatstr), repr(value), repr(output)), end=' ')
+ print("%s %% %s =? %s ..." %
+ (repr(formatstr), repr(value), repr(output)), end=' ')
else:
- print("%s %% %s works? ..." % (repr(formatstr), repr(value)), end=' ')
+ print("%s %% %s works? ..." % (repr(formatstr), repr(value)),
+ end=' ')
result = func(formatstr, value, grouping = grouping)
if output and result != output:
if verbose:
print('no')
- print("%s %% %s == %s != %s" %\
+ print("%s %% %s == %s != %s" %
(repr(formatstr), repr(value), repr(result), repr(output)))
else:
if verbose: