MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_inst_method_calling

Method test_inst_method_calling

Lib/test/test_trace.py:313–322  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

311 @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
312 'pre-existing trace function throws off measurements')
313 def test_inst_method_calling(self):
314 obj = TracedClass(20)
315 self.tracer.runfunc(obj.inst_method_calling, 1)
316
317 expected = {
318 self.filemod + ('TracedClass.inst_method_calling',): 1,
319 self.filemod + ('TracedClass.inst_method_linear',): 1,
320 self.filemod + ('traced_func_linear',): 1,
321 }
322 self.assertEqual(self.tracer.results().calledfuncs, expected)
323
324 def test_traced_decorated_function(self):
325 self.tracer.runfunc(traced_decorated_function)

Callers

nothing calls this directly

Calls 4

TracedClassClass · 0.85
runfuncMethod · 0.80
resultsMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected