tests/misc/sys_settrace: Make test output independent of invoked path.

The original logic of reducing a full path to a relative one assumes
"tests/misc" is in the filename which is limited in usage: it never works
for CPython on Windows since that will use a backslash as path separator,
and also won't work when the filename is a path not relative to the tests
directory which happens for example in the common case of running
"./run-tests -d misc".

Fix all cases by printing only the bare filename, which requires them all
to start with sys_settrace_ hence the renaming.
pull/6716/head
stijn 2020-12-15 11:54:34 +01:00 zatwierdzone przez Damien George
rodzic 505a1853b9
commit 108183fcc0
7 zmienionych plików z 195 dodań i 195 usunięć

Wyświetl plik

@ -20,8 +20,8 @@ def print_stacktrace(frame, level=0):
" ", " ",
frame.f_globals["__name__"], frame.f_globals["__name__"],
frame.f_code.co_name, frame.f_code.co_name,
# reduce full path to some pseudo-relative # Keep just the filename.
"misc" + "".join(frame.f_code.co_filename.split("tests/misc")[-1:]), "sys_settrace_" + frame.f_code.co_filename.split("sys_settrace_")[-1],
frame.f_lineno, frame.f_lineno,
) )
) )
@ -95,9 +95,9 @@ def do_tests():
print("Who loves the sun?") print("Who loves the sun?")
print("Not every-", factorial(3)) print("Not every-", factorial(3))
from sys_settrace_subdir import trace_generic from sys_settrace_subdir import sys_settrace_generic
trace_generic.run_tests() sys_settrace_generic.run_tests()
return return

Wyświetl plik

@ -17,8 +17,8 @@ def print_stacktrace(frame, level=0):
" ", " ",
frame.f_globals["__name__"], frame.f_globals["__name__"],
frame.f_code.co_name, frame.f_code.co_name,
# reduce full path to some pseudo-relative # Keep just the filename.
"misc" + "".join(frame.f_code.co_filename.split("tests/misc")[-1:]), "sys_settrace_" + frame.f_code.co_filename.split("sys_settrace_")[-1],
frame.f_lineno, frame.f_lineno,
) )
) )

Wyświetl plik

@ -1,195 +1,195 @@
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:41 0: @__main__:test_generator => sys_settrace_generator.py:41
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:42 0: @__main__:test_generator => sys_settrace_generator.py:42
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:48 0: @__main__:test_generator => sys_settrace_generator.py:48
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:49 0: @__main__:test_generator => sys_settrace_generator.py:49
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:50 0: @__main__:test_generator => sys_settrace_generator.py:50
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:52 0: @__main__:test_generator => sys_settrace_generator.py:52
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:42 0: @__main__:make_gen => sys_settrace_generator.py:42
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:52 1: @__main__:test_generator => sys_settrace_generator.py:52
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:52 1: @__main__:test_generator => sys_settrace_generator.py:52
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:52 1: @__main__:test_generator => sys_settrace_generator.py:52
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 0: @__main__:test_generator => sys_settrace_generator.py:56
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:46 0: @__main__:make_gen => sys_settrace_generator.py:46
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:46 0: @__main__:make_gen => sys_settrace_generator.py:46
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 1: @__main__:test_generator => sys_settrace_generator.py:56
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: exception ### trace_handler::main event: exception
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:56 0: @__main__:test_generator => sys_settrace_generator.py:56
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:58 0: @__main__:test_generator => sys_settrace_generator.py:58
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:59 0: @__main__:test_generator => sys_settrace_generator.py:59
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
test_generator 7 8 test_generator 7 8
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:61 0: @__main__:test_generator => sys_settrace_generator.py:61
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:62 0: @__main__:test_generator => sys_settrace_generator.py:62
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 0: @__main__:test_generator => sys_settrace_generator.py:63
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:42 0: @__main__:make_gen => sys_settrace_generator.py:42
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 0: @__main__:test_generator => sys_settrace_generator.py:63
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:64 0: @__main__:test_generator => sys_settrace_generator.py:64
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 0: @__main__:test_generator => sys_settrace_generator.py:63
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:43 0: @__main__:make_gen => sys_settrace_generator.py:43
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 0: @__main__:test_generator => sys_settrace_generator.py:63
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:64 0: @__main__:test_generator => sys_settrace_generator.py:64
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 0: @__main__:test_generator => sys_settrace_generator.py:63
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:44 0: @__main__:make_gen => sys_settrace_generator.py:44
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 0: @__main__:test_generator => sys_settrace_generator.py:63
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:64 0: @__main__:test_generator => sys_settrace_generator.py:64
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 0: @__main__:test_generator => sys_settrace_generator.py:63
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:45 0: @__main__:make_gen => sys_settrace_generator.py:45
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:46 0: @__main__:make_gen => sys_settrace_generator.py:46
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:make_gen => miscmisc/sys_settrace_generator.py:46 0: @__main__:make_gen => sys_settrace_generator.py:46
1: @__main__:test_generator => miscmisc/sys_settrace_generator.py:63 1: @__main__:test_generator => sys_settrace_generator.py:63
2: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 2: @__main__:<module> => sys_settrace_generator.py:69
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:65 0: @__main__:test_generator => sys_settrace_generator.py:65
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
7 7
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:test_generator => miscmisc/sys_settrace_generator.py:65 0: @__main__:test_generator => sys_settrace_generator.py:65
1: @__main__:<module> => miscmisc/sys_settrace_generator.py:69 1: @__main__:<module> => sys_settrace_generator.py:69
Total traces executed: 54 Total traces executed: 54

Wyświetl plik

@ -17,8 +17,8 @@ def print_stacktrace(frame, level=0):
" ", " ",
frame.f_globals["__name__"], frame.f_globals["__name__"],
frame.f_code.co_name, frame.f_code.co_name,
# reduce full path to some pseudo-relative # Keep just the filename.
"misc" + "".join(frame.f_code.co_filename.split("tests/misc")[-1:]), "sys_settrace_" + frame.f_code.co_filename.split("sys_settrace_")[-1],
frame.f_lineno, frame.f_lineno,
) )
) )

Wyświetl plik

@ -1,72 +1,72 @@
### trace_handler::main event: call ### trace_handler::main event: call
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:41 0: @__main__:test_loop => sys_settrace_loop.py:41
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:43 0: @__main__:test_loop => sys_settrace_loop.py:43
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:44 0: @__main__:test_loop => sys_settrace_loop.py:44
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:45 0: @__main__:test_loop => sys_settrace_loop.py:45
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:44 0: @__main__:test_loop => sys_settrace_loop.py:44
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:45 0: @__main__:test_loop => sys_settrace_loop.py:45
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:44 0: @__main__:test_loop => sys_settrace_loop.py:44
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:45 0: @__main__:test_loop => sys_settrace_loop.py:45
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:44 0: @__main__:test_loop => sys_settrace_loop.py:44
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:45 0: @__main__:test_loop => sys_settrace_loop.py:45
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:46 0: @__main__:test_loop => sys_settrace_loop.py:46
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
test_for_loop 3 test_for_loop 3
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:49 0: @__main__:test_loop => sys_settrace_loop.py:49
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:50 0: @__main__:test_loop => sys_settrace_loop.py:50
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:51 0: @__main__:test_loop => sys_settrace_loop.py:51
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:53 0: @__main__:test_loop => sys_settrace_loop.py:53
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:52 0: @__main__:test_loop => sys_settrace_loop.py:52
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:53 0: @__main__:test_loop => sys_settrace_loop.py:53
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:52 0: @__main__:test_loop => sys_settrace_loop.py:52
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:53 0: @__main__:test_loop => sys_settrace_loop.py:53
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:52 0: @__main__:test_loop => sys_settrace_loop.py:52
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:53 0: @__main__:test_loop => sys_settrace_loop.py:53
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
### trace_handler::main event: line ### trace_handler::main event: line
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:54 0: @__main__:test_loop => sys_settrace_loop.py:54
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
test_while_loop 3 test_while_loop 3
### trace_handler::main event: return ### trace_handler::main event: return
0: @__main__:test_loop => miscmisc/sys_settrace_loop.py:54 0: @__main__:test_loop => sys_settrace_loop.py:54
1: @__main__:<module> => miscmisc/sys_settrace_loop.py:58 1: @__main__:<module> => sys_settrace_loop.py:58
Total traces executed: 23 Total traces executed: 23

Wyświetl plik

@ -41,10 +41,10 @@ def test_lambda():
# import # import
def test_import(): def test_import():
from sys_settrace_subdir import trace_importme from sys_settrace_subdir import sys_settrace_importme
trace_importme.dummy() sys_settrace_importme.dummy()
trace_importme.saysomething() sys_settrace_importme.saysomething()
# class # class