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

gh-88494: Reduce CLOCK_RES to 1 ms in tests#118395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
vstinner wants to merge2 commits intopython:mainfromvstinner:clock_res
Closed
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
Fix test_asyncio.test_windows_events
  • Loading branch information
@vstinner
vstinner committedApr 29, 2024
commiteb4e7d36d8c7b932ade8c7af6c9ba7a3978914e3
6 changes: 5 additions & 1 deletionLib/test/test_asyncio/test_windows_events.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -177,6 +177,10 @@ def test_wait_for_handle(self):
event = _overlapped.CreateEvent(None, True, False, None)
self.addCleanup(_winapi.CloseHandle, event)

# RegisterWaitForSingleObject() has a resolution of 15.6 ms.
# Tolerate 50 ms difference when comparing timings.
CLOCK_RES = 0.050

# Wait for unset event with 0.5s timeout;
# result should be False at timeout
timeout = 0.5
Expand All@@ -187,7 +191,7 @@ def test_wait_for_handle(self):

self.assertEqual(done, False)
self.assertFalse(fut.result())
self.assertGreaterEqual(elapsed, timeout -test_utils.CLOCK_RES)
self.assertGreaterEqual(elapsed, timeout - CLOCK_RES)

_overlapped.SetEvent(event)

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp