summaryrefslogtreecommitdiff
path: root/Lib/test/test_time.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-08-18 15:37:38 +0000
committerGuido van Rossum <guido@python.org>1997-08-18 15:37:38 +0000
commit9ca054b179c301f116319d2a8b6382f6eb1d7984 (patch)
tree45682cef7ce975a6762012506778633cbdd89705 /Lib/test/test_time.py
parent366759eebec9ee1b396b4611bef9a4214ae77599 (diff)
downloadcpython-9ca054b179c301f116319d2a8b6382f6eb1d7984.tar.gz
Tweaks to cope with strftime returning 0 without error for %Z
Diffstat (limited to 'Lib/test/test_time.py')
-rw-r--r--Lib/test/test_time.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
index 85ea6ee592..acc4d4106b 100644
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -16,8 +16,11 @@ tt = time.gmtime(t)
for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I',
'j', 'm', 'M', 'p', 'S',
'U', 'w', 'W', 'x', 'X', 'y', 'Y', 'Z', '%'):
- format = '%' + directive
- time.strftime(format, tt)
+ format = ' %' + directive
+ try:
+ time.strftime(format, tt)
+ except ValueError:
+ print 'conversion specifier:', format, ' failed.'
time.timezone
time.tzname