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
12c2945c
Commit
12c2945c
authored
Oct 08, 2015
by
Steve Dower
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #23919: Prevents assert dialogs appearing in the test suite.
parent
b6c9572f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
Lib/test/libregrtest/cmdline.py
Lib/test/libregrtest/cmdline.py
+4
-0
Lib/test/libregrtest/setup.py
Lib/test/libregrtest/setup.py
+9
-3
No files found.
Lib/test/libregrtest/cmdline.py
View file @
12c2945c
...
...
@@ -304,6 +304,10 @@ def _parse_args(args, **kwargs):
if
ns
.
pgo
and
(
ns
.
verbose
or
ns
.
verbose2
or
ns
.
verbose3
):
parser
.
error
(
"--pgo/-v don't go together!"
)
if
ns
.
nowindows
:
print
(
"Warning: the --nowindows (-n) option is deprecated. "
"Use -vv to display assertions in stderr."
,
file
=
sys
.
stderr
)
if
ns
.
quiet
:
ns
.
verbose
=
0
if
ns
.
timeout
is
not
None
:
...
...
Lib/test/libregrtest/setup.py
View file @
12c2945c
...
...
@@ -75,8 +75,11 @@ def setup_tests(ns):
if
ns
.
threshold
is
not
None
:
gc
.
set_threshold
(
ns
.
threshold
)
if
ns
.
nowindows
:
try
:
import
msvcrt
except
ImportError
:
pass
else
:
msvcrt
.
SetErrorMode
(
msvcrt
.
SEM_FAILCRITICALERRORS
|
msvcrt
.
SEM_NOALIGNMENTFAULTEXCEPT
|
msvcrt
.
SEM_NOGPFAULTERRORBOX
|
...
...
@@ -88,8 +91,11 @@ def setup_tests(ns):
pass
else
:
for
m
in
[
msvcrt
.
CRT_WARN
,
msvcrt
.
CRT_ERROR
,
msvcrt
.
CRT_ASSERT
]:
msvcrt
.
CrtSetReportMode
(
m
,
msvcrt
.
CRTDBG_MODE_FILE
)
msvcrt
.
CrtSetReportFile
(
m
,
msvcrt
.
CRTDBG_FILE_STDERR
)
if
ns
.
verbose
and
ns
.
verbose
>=
2
:
msvcrt
.
CrtSetReportMode
(
m
,
msvcrt
.
CRTDBG_MODE_FILE
)
msvcrt
.
CrtSetReportFile
(
m
,
msvcrt
.
CRTDBG_FILE_STDERR
)
else
:
msvcrt
.
CrtSetReportMode
(
m
,
0
)
support
.
use_resources
=
ns
.
use_resources
...
...
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