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
0dec1bfe
Commit
0dec1bfe
authored
Jun 01, 2012
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix sporadic failure of test_time.test_process_time() on Windows
Use a threshold of 20 ms instead of 10 ms.
parent
5a0d4391
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Lib/test/test_time.py
Lib/test/test_time.py
+5
-2
No files found.
Lib/test/test_time.py
View file @
0dec1bfe
...
...
@@ -380,10 +380,13 @@ class TimeTestCase(unittest.TestCase):
time
.
perf_counter
()
def
test_process_time
(
self
):
# process_time() should not include time spend during a sleep
start
=
time
.
process_time
()
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
00
)
stop
=
time
.
process_time
()
self
.
assertLess
(
stop
-
start
,
0.01
)
# use 20 ms because process_time() has usually a resolution of 15 ms
# on Windows
self
.
assertLess
(
stop
-
start
,
0.020
)
info
=
time
.
get_clock_info
(
'process_time'
)
self
.
assertTrue
(
info
.
monotonic
)
...
...
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