Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit2a35c93

Browse files
committed
Fix test_datetime on Windows
Issuepython#29100: On Windows, datetime.datetime.fromtimestamp(min_ts) fails with anOSError in test_timestamp_limits().
1 parent6f37e36 commit2a35c93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎Lib/test/datetimetester.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,8 +1997,9 @@ def test_timestamp_limits(self):
19971997
# date 0001-01-01 00:00:00+00:00: timestamp=-62135596800
19981998
self.assertEqual(self.theclass.fromtimestamp(min_ts,tz=timezone.utc),
19991999
min_dt)
2000-
exceptOverflowErrorasexc:
2001-
# the date 0001-01-01 doesn't fit into 32-bit time_t
2000+
except (OverflowError,OSError)asexc:
2001+
# the date 0001-01-01 doesn't fit into 32-bit time_t,
2002+
# or platform doesn't support such very old date
20022003
self.skipTest(str(exc))
20032004

20042005
# maximum timestamp: set seconds to zero to avoid rounding issues

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp