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

Method test_traced_decorated_function

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

Source from the content-addressed store, hash-verified

201
202 @unittest.expectedFailure # TODO: RUSTPYTHON; Diff is 996 characters long. Set self.maxDiff to None to see it.
203 def test_traced_decorated_function(self):
204 self.tracer.runfunc(traced_decorated_function)
205
206 firstlineno = get_firstlineno(traced_decorated_function)
207 expected = {
208 (self.my_py_filename, firstlineno + 1): 1,
209 (self.my_py_filename, firstlineno + 2): 1,
210 (self.my_py_filename, firstlineno + 3): 1,
211 (self.my_py_filename, firstlineno + 4): 1,
212 (self.my_py_filename, firstlineno + 5): 1,
213 (self.my_py_filename, firstlineno + 6): 1,
214 (self.my_py_filename, firstlineno + 7): 2,
215 (self.my_py_filename, firstlineno + 8): 2,
216 (self.my_py_filename, firstlineno + 9): 2,
217 (self.my_py_filename, firstlineno + 10): 1,
218 (self.my_py_filename, firstlineno + 11): 1,
219 }
220 self.assertEqual(self.tracer.results().counts, expected)
221
222 @unittest.expectedFailure # TODO: RUSTPYTHON; + {('/Users/al03219714/Projects/RustPython4/crates/pylib/Lib/test/test_trace.py', 108): 1}
223 def test_linear_methods(self):

Callers

nothing calls this directly

Calls 4

get_firstlinenoFunction · 0.85
runfuncMethod · 0.80
resultsMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected