diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-08 11:39:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-04-08 11:39:59 (GMT) |
commit | c790a5346d8918a698ca2bd01491255ae21faa61 (patch) | |
tree | f0f735a951f9c0958626f2782bd66d7a0ec0aa31 /Lib/test/test_faulthandler.py | |
parent | 941893291a43008ebdc85eddd832de5edb07c2d1 (diff) | |
download | cpython-c790a5346d8918a698ca2bd01491255ae21faa61.zip cpython-c790a5346d8918a698ca2bd01491255ae21faa61.tar.gz cpython-c790a5346d8918a698ca2bd01491255ae21faa61.tar.bz2 |
faulthandler: dump_tracebacks_later() displays also the timeout
Diffstat (limited to 'Lib/test/test_faulthandler.py')
-rw-r--r-- | Lib/test/test_faulthandler.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index 483c7f1..d08347d 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -1,4 +1,5 @@ from contextlib import contextmanager +import datetime import faulthandler import re import signal @@ -360,6 +361,7 @@ Current thread XXX: Raise an error if the output doesn't match the expect format. """ + timeout_str = str(datetime.timedelta(seconds=TIMEOUT)) code = """ import faulthandler import time @@ -399,7 +401,7 @@ if file is not None: count = loops if repeat: count *= 2 - header = 'Thread 0x[0-9a-f]+:\n' + header = r'Timeout \(%s\)!\nThread 0x[0-9a-f]+:\n' % timeout_str regex = expected_traceback(9, 20, header, count=count) self.assertRegex(trace, regex) else: |