Author: Maciej Fijalkowski <fij...@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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit