summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_strftime.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
commitbe19ed77ddb047e02fe94d142181062af6d99dcc (patch)
tree70f214e06554046fcccbadeb78665f25e07ce965 /Lib/test/test_strftime.py
parent452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff)
downloadcpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
Diffstat (limited to 'Lib/test/test_strftime.py')
-rwxr-xr-xLib/test/test_strftime.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/Lib/test/test_strftime.py b/Lib/test/test_strftime.py
index 26bae1b..c6db3dd 100755
--- a/Lib/test/test_strftime.py
+++ b/Lib/test/test_strftime.py
@@ -40,7 +40,7 @@ def escapestr(text, ampm):
def strftest(now):
if verbose:
- print "strftime test for", time.ctime(now)
+ print("strftime test for", time.ctime(now))
nowsecs = str(int(now))[:-1]
gmt = time.gmtime(now)
now = time.localtime(now)
@@ -113,42 +113,42 @@ def strftest(now):
)
if verbose:
- print "Strftime test, platform: %s, Python version: %s" % \
- (sys.platform, sys.version.split()[0])
+ print("Strftime test, platform: %s, Python version: %s" % \
+ (sys.platform, sys.version.split()[0]))
for e in expectations:
try:
result = time.strftime(e[0], now)
except ValueError as error:
- print "Standard '%s' format gave error:" % e[0], error
+ print("Standard '%s' format gave error:" % e[0], error)
continue
if re.match(escapestr(e[1], ampm), result): continue
if not result or result[0] == '%':
- print "Does not support standard '%s' format (%s)" % (e[0], e[2])
+ print("Does not support standard '%s' format (%s)" % (e[0], e[2]))
else:
- print "Conflict for %s (%s):" % (e[0], e[2])
- print " Expected %s, but got %s" % (e[1], result)
+ print("Conflict for %s (%s):" % (e[0], e[2]))
+ print(" Expected %s, but got %s" % (e[1], result))
for e in nonstandard_expectations:
try:
result = time.strftime(e[0], now)
except ValueError as result:
if verbose:
- print "Error for nonstandard '%s' format (%s): %s" % \
- (e[0], e[2], str(result))
+ print("Error for nonstandard '%s' format (%s): %s" % \
+ (e[0], e[2], str(result)))
continue
if re.match(escapestr(e[1], ampm), result):
if verbose:
- print "Supports nonstandard '%s' format (%s)" % (e[0], e[2])
+ print("Supports nonstandard '%s' format (%s)" % (e[0], e[2]))
elif not result or result[0] == '%':
if verbose:
- print "Does not appear to support '%s' format (%s)" % (e[0],
- e[2])
+ print("Does not appear to support '%s' format (%s)" % (e[0],
+ e[2]))
else:
if verbose:
- print "Conflict for nonstandard '%s' format (%s):" % (e[0],
- e[2])
- print " Expected %s, but got %s" % (e[1], result)
+ print("Conflict for nonstandard '%s' format (%s):" % (e[0],
+ e[2]))
+ print(" Expected %s, but got %s" % (e[1], result))
def fixasctime(s):
if s[8] == ' ':