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
3c18f259
Commit
3c18f259
authored
May 22, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regrtest: enable faulthandler in main() instead of if __name__ == '__main__':
So it's also enabled when using "./python -m test".
parent
b455e58b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/test/regrtest.py
Lib/test/regrtest.py
+4
-3
No files found.
Lib/test/regrtest.py
View file @
3c18f259
...
...
@@ -265,6 +265,10 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
directly to set the values that would normally be set by flags
on the command line.
"""
# Display the Python traceback fatal errors (e.g. segfault)
faulthandler
.
enable
(
all_threads
=
True
)
if
hasattr
(
faulthandler
,
'dump_tracebacks_later'
):
timeout
=
60
*
60
else
:
...
...
@@ -1588,9 +1592,6 @@ def _make_temp_dir_for_build(TEMPDIR):
return TEMPDIR, TESTCWD
if __name__ == '__main__':
# Display the Python traceback on segfault and division by zero
faulthandler.enable(all_threads=True)
# Remove regrtest.py's own directory from the module search path. Despite
# the elimination of implicit relative imports, this is still needed to
# ensure that submodules of the test package do not inappropriately appear
...
...
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