Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8050ca9c
Commit
8050ca9c
authored
Mar 14, 2012
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #14180: TestDateTime.test_microsecond_rounding() handles localtime() and
gmtime() failure on Windows
parent
21f58935
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
Lib/test/datetimetester.py
Lib/test/datetimetester.py
+15
-10
No files found.
Lib/test/datetimetester.py
View file @
8050ca9c
...
@@ -1741,16 +1741,21 @@ class TestDateTime(TestDate):
...
@@ -1741,16 +1741,21 @@ class TestDateTime(TestDate):
zero
=
fts
(
0
)
zero
=
fts
(
0
)
self
.
assertEqual
(
zero
.
second
,
0
)
self
.
assertEqual
(
zero
.
second
,
0
)
self
.
assertEqual
(
zero
.
microsecond
,
0
)
self
.
assertEqual
(
zero
.
microsecond
,
0
)
minus_one
=
fts
(
-
1e-6
)
try
:
self
.
assertEqual
(
minus_one
.
second
,
59
)
minus_one
=
fts
(
-
1e-6
)
self
.
assertEqual
(
minus_one
.
microsecond
,
999999
)
except
OSError
:
# localtime(-1) and gmtime(-1) is not supported on Windows
t
=
fts
(
-
1e-8
)
pass
self
.
assertEqual
(
t
,
minus_one
)
else
:
t
=
fts
(
-
9e-7
)
self
.
assertEqual
(
minus_one
.
second
,
59
)
self
.
assertEqual
(
t
,
minus_one
)
self
.
assertEqual
(
minus_one
.
microsecond
,
999999
)
t
=
fts
(
-
1e-7
)
self
.
assertEqual
(
t
,
minus_one
)
t
=
fts
(
-
1e-8
)
self
.
assertEqual
(
t
,
minus_one
)
t
=
fts
(
-
9e-7
)
self
.
assertEqual
(
t
,
minus_one
)
t
=
fts
(
-
1e-7
)
self
.
assertEqual
(
t
,
minus_one
)
t
=
fts
(
1e-7
)
t
=
fts
(
1e-7
)
self
.
assertEqual
(
t
,
zero
)
self
.
assertEqual
(
t
,
zero
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment