tests/misc/sys_settrace_features.py: Fix running with non-dflt encoding.
Notably git-cmd which comes with git installations on Windows alters the
encoding resulting in CPython tracing encodings/cp1252.py calls.
@@ -60,8 +60,9 @@ def trace_tick_handler_bob(frame, event, arg):
def trace_tick_handler(frame, event, arg):
# Ignore CPython specific helpers.
+ to_ignore = ["importlib", "zipimport", "encodings"]
frame_name = frame.f_globals["__name__"]
- if frame_name.find("importlib") != -1 or frame_name.find("zipimport") != -1:
+ if any(name in frame_name for name in to_ignore):
return
print("### trace_handler::main event:", event)
