Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 052e984

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

File tree

1 file changed

+7
-2
lines changed
Filter options

1 file changed

+7
-2
lines changed

‎extra_tests/snippets/stdlib_datetime.py

Copy file name to clipboardExpand all lines: extra_tests/snippets/stdlib_datetime.py
+7-2Lines changed: 7 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.