cpython: Issue #11393: get more information on assertion error (test_faulthandler)

http://hg.python.org/cpython/rev/61626c3f3a54 changeset: 69086:61626c3f3a54 user: Victor Stinner <victor.stinner@haypocalc.com> date: Thu Mar 31 19:07:58 2011 +0200 summary: Issue #11393: get more information on assertion error (test_faulthandler) files: Lib/test/test_faulthandler.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -354,7 +354,7 @@ faulthandler.cancel_dump_tracebacks_later() b = time.time() # Check that sleep() was not interrupted - assert (b -a) >= pause + assert (b - a) >= pause, "{{}} < {{}}".format(b - a, pause) if cancel: pause = timeout * 1.5 @@ -362,7 +362,7 @@ time.sleep(pause) b = time.time() # Check that sleep() was not interrupted - assert (b -a) >= pause + assert (b - a) >= pause, "{{}} < {{}}".format(b - a, pause) timeout = 0.5 repeat = {repeat} -- Repository URL: http://hg.python.org/cpython

On 3/31/2011 1:08 PM, victor.stinner wrote:
http://hg.python.org/cpython/rev/61626c3f3a54 changeset: 69086:61626c3f3a54 user: Victor Stinner<victor.stinner@haypocalc.com> date: Thu Mar 31 19:07:58 2011 +0200 summary: Issue #11393: get more information on assertion error (test_faulthandler)
files: Lib/test/test_faulthandler.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -354,7 +354,7 @@ faulthandler.cancel_dump_tracebacks_later() b = time.time() # Check that sleep() was not interrupted - assert (b -a)>= pause + assert (b - a)>= pause, "{{}}< {{}}".format(b - a, pause)
+ assert (b - a)>= pause, "{{}}< {{}}".format(b - a, pause)
a,b,pause = 0,0,1 "{{}} < {{}}".format(b - a, pause) '{} < {}'
I suspect you want 1 or 3 braces. Terry
participants (2)
-
Terry Reedy
-
victor.stinner