We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Hey,
I was wondering if the opcode tracing added with Python 3.7 might be useful:
def wrap(frame, event, arg): frame.f_trace_lines = False frame.f_trace_opcodes = True code = frame.f_code if event == "opcode": filename = code.co_filename linenumber = frame.f_lineno opcode = dis.opname[code.co_code[frame.f_lasti]] print(level * 4 * " ", [event, filename, linenumber, opcode]) else: ....
['call', <frame at 0x7f1dfd1cb040, file 'settrace.py', line 44, code mytestfunction>, None] ['opcode', 'settrace.py', 45, 'LOAD_CONST'] ['opcode', 'settrace.py', 45, 'LOAD_FAST'] ['opcode', 'settrace.py', 45, 'COMPARE_OP'] ['opcode', 'settrace.py', 45, 'POP_JUMP_IF_FALSE'] ['opcode', 'settrace.py', 45, 'LOAD_CONST'] ['opcode', 'settrace.py', 45, 'LOAD_FAST'] ['opcode', 'settrace.py', 45, 'COMPARE_OP'] ['opcode', 'settrace.py', 45, 'POP_JUMP_IF_FALSE'] ['opcode', 'settrace.py', 45, 'LOAD_CONST'] ['opcode', 'settrace.py', 45, 'LOAD_FAST'] ['opcode', 'settrace.py', 45, 'COMPARE_OP'] ['opcode', 'settrace.py', 45, 'POP_JUMP_IF_FALSE'] ['opcode', 'settrace.py', 45, 'LOAD_CONST'] ['opcode', 'settrace.py', 45, 'RETURN_VALUE'] ['return', <frame at 0x7f1dfd1cb040, file 'settrace.py', line 45, code mytestfunction>, None]
From what I understand it would make it easier to get coverage for multipl conditions per line like
if foo and bar and quux: ...
But not sure and not sure what the performance impact is.
The text was updated successfully, but these errors were encountered:
Sounds interesting, but I won't have time to work on this any time soon.
Sorry, something went wrong.
Thanks, maybe I will
After fixing the 1000 bugs this has found for me :P, in other words, thanks for this!
No branches or pull requests
Hey,
I was wondering if the opcode tracing added with Python 3.7 might be useful:
From what I understand it would make it easier to get coverage for multipl conditions per line like
But not sure and not sure what the performance impact is.
The text was updated successfully, but these errors were encountered: