MCPcopy
hub / github.com/mne-tools/mne-python / remove_traceback

Function remove_traceback

mne/utils/tests/test_misc.py:81–88  ·  view source on GitHub ↗
(log)

Source from the content-addressed store, hash-verified

79 if do_raise: # remove traceback
80
81 def remove_traceback(log):
82 return "\n".join(
83 line
84 for line in log.split("\n")
85 if not line.strip().startswith(
86 ("File ", "raise ", "RuntimeError: ", "Traceback ")
87 )
88 )
89
90 log = remove_traceback(log)
91 stderr = remove_traceback(stderr)

Callers 1

test_run_subprocessFunction · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected