[pypy-issue] [issue1369] strftime behaviour on OS X

Kenny Levinsen tracker at bugs.pypy.org
Wed Jan 16 23:19:27 CET 2013


New submission from Kenny Levinsen <kennylevinsen at gmail.com>:

OS X fails the strftime test:

import time as rctime
...
>           assert rctime.strftime('%f') == '%f'
E           assert 'f' == '%f'
E             - f
E             + %f
module/rctime/test/test_rctime.py:235: AssertionError

I have tested on CPython, and behaviour is the same - time.strftime('%f') returns 
'f' (and some goes 
for all other "invalid" input, such as %Q returning Q). (I was too lazy to compile 
a time.h test, 
though)

Assuming we're okay with OS X's behaviour, we'll need to add a simple darwin check 
in the test:

import time as rctime
import sys
...
if sys.platform == 'darwin':
    assert rctime.strftime('%f') == 'f'
else:
    assert rctime.strftime('%f') == '%f'

----------
messages: 5167
nosy: joushou, pypy-issue
priority: bug
status: unread
title: strftime behaviour on OS X

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1369>
________________________________________


More information about the pypy-issue mailing list