From 1b3241fa0cbf72ec5220d64fdfc6f2982af15c3c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 3 Apr 2011 18:41:22 +0200 Subject: [PATCH] test_faulthandler: fix regex on the check_dump_traceback_threads() traceback The traceback may contain "_is_owned": Thread 0x40962b90: File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 220 in _is_owned File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 227 in wait File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 421 in wait File "", line 23 in run File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 735 in _bootstrap_inner File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/threading.py", line 708 in _bootstrap Current thread XXX: File "", line 10 in dump File "", line 28 in --- Lib/test/test_faulthandler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_faulthandler.py b/Lib/test/test_faulthandler.py index a919900546e..2730aff7c02 100644 --- a/Lib/test/test_faulthandler.py +++ b/Lib/test/test_faulthandler.py @@ -325,9 +325,8 @@ waiter.join() lineno = 10 regex = """ ^Thread 0x[0-9a-f]+: -(?: File ".*threading.py", line [0-9]+ in wait -)? File ".*threading.py", line [0-9]+ in wait - File "", line 23 in run +(?: File ".*threading.py", line [0-9]+ in [_a-z]+ +){{1,3}} File "", line 23 in run File ".*threading.py", line [0-9]+ in _bootstrap_inner File ".*threading.py", line [0-9]+ in _bootstrap