Skip to content

Commit 052e984

Browse files
committed
chore! add platform specific test cases for windows and mac
1 parent 8efc20e commit 052e984

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

extra_tests/snippets/stdlib_datetime.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,13 @@ 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-
assert_equal(_time.strftime("%?"), "%?")
134+
# unsupport format in strptime returns arg itself
135+
# in linux.
136+
if sys.platform == 'linux':
137+
assert_equal(_time.strftime("%?"), "%?")
138+
elif sys.platform in ('darwin', 'win32'):
139+
# or return Value error in case Mac/Windows
140+
with assert_raises(ValueError): _time.strftime("%?")
136141

137142
# XXX: bug #1302
138143
# def test_normal(self):

0 commit comments

Comments
 (0)