Skip to content

Commit d4a6d39

Browse files
committed
feat! add test case for unsupported time format
1 parent 5b17bd6 commit d4a6d39

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extra_tests/snippets/stdlib_datetime.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,10 @@ def __init__(self, offset, name):
131131
assert_raises(NotImplementedError, ne.utcoffset, dt)
132132
assert_raises(NotImplementedError, ne.dst, dt)
133133

134-
# unsupport format in strptime should returns arg itself
135-
# XXX this fails because it runs in python not rustpython
136-
assert_equal(_time.strftime("%4Y"), "%4Y")
134+
# unsupport format in strptime returns arg itself
135+
# in linux. Todo: add cases for Mac/Windows
136+
if sys.platform in ('linux'):
137+
assert_equal(_time.strftime("%?"), "%?")
137138

138139
# XXX: bug #1302
139140
# def test_normal(self):

0 commit comments

Comments
 (0)