mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Issue #11393: get more information on assertion error (test_faulthandler)
This commit is contained in:
parent
7d648a0cec
commit
eb50e51a0f
1 changed files with 2 additions and 2 deletions
|
@ -354,7 +354,7 @@ def func(repeat, cancel, timeout):
|
||||||
faulthandler.cancel_dump_tracebacks_later()
|
faulthandler.cancel_dump_tracebacks_later()
|
||||||
b = time.time()
|
b = time.time()
|
||||||
# Check that sleep() was not interrupted
|
# Check that sleep() was not interrupted
|
||||||
assert (b -a) >= pause
|
assert (b - a) >= pause, "{{}} < {{}}".format(b - a, pause)
|
||||||
|
|
||||||
if cancel:
|
if cancel:
|
||||||
pause = timeout * 1.5
|
pause = timeout * 1.5
|
||||||
|
@ -362,7 +362,7 @@ def func(repeat, cancel, timeout):
|
||||||
time.sleep(pause)
|
time.sleep(pause)
|
||||||
b = time.time()
|
b = time.time()
|
||||||
# Check that sleep() was not interrupted
|
# Check that sleep() was not interrupted
|
||||||
assert (b -a) >= pause
|
assert (b - a) >= pause, "{{}} < {{}}".format(b - a, pause)
|
||||||
|
|
||||||
timeout = 0.5
|
timeout = 0.5
|
||||||
repeat = {repeat}
|
repeat = {repeat}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue