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
a3015a6a
Commit
a3015a6a
authored
Dec 24, 2010
by
Brian Quinlan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better reporting of test failures on Windows.
parent
dfd7eb0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
Lib/test/test_concurrent_futures.py
Lib/test/test_concurrent_futures.py
+15
-3
No files found.
Lib/test/test_concurrent_futures.py
View file @
a3015a6a
...
@@ -75,15 +75,27 @@ class Call(object):
...
@@ -75,15 +75,27 @@ class Call(object):
def
_wait_on_event
(
self
,
handle
):
def
_wait_on_event
(
self
,
handle
):
if
sys
.
platform
.
startswith
(
'win'
):
if
sys
.
platform
.
startswith
(
'win'
):
# WaitForSingleObject returns 0 if handle is signaled.
r
=
ctypes
.
windll
.
kernel32
.
WaitForSingleObject
(
handle
,
60
*
1000
)
r
=
ctypes
.
windll
.
kernel32
.
WaitForSingleObject
(
handle
,
60
*
1000
)
assert
r
==
0
if
r
!=
0
:
message
=
(
'WaitForSingleObject({}, ...) failed with {}, '
'GetLastError() = {}'
.
format
(
handle
,
r
,
ctypes
.
GetLastError
()))
logging
.
critical
(
message
)
assert
False
,
message
else
:
else
:
self
.
CALL_LOCKS
[
handle
].
wait
()
self
.
CALL_LOCKS
[
handle
].
wait
()
def
_signal_event
(
self
,
handle
):
def
_signal_event
(
self
,
handle
):
if
sys
.
platform
.
startswith
(
'win'
):
if
sys
.
platform
.
startswith
(
'win'
):
r
=
ctypes
.
windll
.
kernel32
.
SetEvent
(
handle
)
r
=
ctypes
.
windll
.
kernel32
.
SetEvent
(
handle
)
# Returns 0 on failure.
assert
r
!=
0
if
r
==
0
:
message
=
(
'SetEvent({}) failed with {}, GetLastError() = {}'
.
format
(
handle
,
r
,
ctypes
.
GetLastError
()))
logging
.
critical
(
message
)
assert
False
,
message
else
:
else
:
self
.
CALL_LOCKS
[
handle
].
set
()
self
.
CALL_LOCKS
[
handle
].
set
()
...
...
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