[pypy-commit] pypy py3.3: Merged in nip3o/pypy/py3.3-exceptions (pull request #328)
fijal
noreply at buildbot.pypy.org
Sat Jul 25 15:04:32 CEST 2015
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: py3.3
Changeset: r78660:42968b84b6df
Date: 2015-07-25 15:04 +0200
http://bitbucket.org/pypy/pypy/changeset/42968b84b6df/
Log: Merged in nip3o/pypy/py3.3-exceptions (pull request #328)
Fixed strftime test on darwin
diff --git a/pypy/module/time/test/test_time.py b/pypy/module/time/test/test_time.py
--- a/pypy/module/time/test/test_time.py
+++ b/pypy/module/time/test/test_time.py
@@ -248,8 +248,6 @@
raises(TypeError, time.strftime, ())
raises(TypeError, time.strftime, (1,))
raises(TypeError, time.strftime, range(8))
- exp = '0 01 01 00 00 00 1 001'
- assert time.strftime("%Y %m %d %H %M %S %w %j", (0,)*9) == exp
# Guard against invalid/non-supported format string
# so that Python don't crash (Windows crashes when the format string
@@ -260,8 +258,15 @@
# darwin strips % of unknown format codes
# http://bugs.python.org/issue9811
assert time.strftime('%f') == 'f'
+
+ # Darwin always use four digits for %Y, Linux uses as many as needed.
+ expected_year = '0000'
else:
assert time.strftime('%f') == '%f'
+ expected_year = '0'
+
+ expected_formatted_date = expected_year + ' 01 01 00 00 00 1 001'
+ assert time.strftime("%Y %m %d %H %M %S %w %j", (0,) * 9) == expected_formatted_date
def test_strftime_ext(self):
import time
More information about the pypy-commit
mailing list