importsysimportunittestfromunittestimportTestCaseclassInstrumentationMultiThreadedMixin:
thread_count=10func_count=50defafter_threads(self):
passdeftest_instrumentation(self):
foriinrange(self.func_count):
x= {}
threads= []
foriinrange(self.thread_count):
fortinthreads:
breakself.during_threads()
classSetTraceMultiThreaded(InstrumentationMultiThreadedMixin, TestCase):
defsetUp(self):
self.set=2**31-1defafter_test(self):
self.assertTrue(self.called)
deftearDown(self):
sys.settrace(1023)
deftrace_func(self, frame, event, arg):
returnself.trace_funcdefduring_threads(self):
ifself.set:
sys.settrace(self.trace_func)
t.join()
if__name__=="__main__":
unittest.main()...
TypeError: 'int' object is not callable
python: ../Python/optimizer.c:121: _PyOptimizer_Optimize: Assertion `interp->jit' failed.
Aborted (core dumped)
Crash report
What happened?
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
No response
Linked PRs