MCPcopy
hub / github.com/django/django / test_trace

Method test_trace

tests/utils_tests/test_lazyobject.py:378–391  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

376 self.assertEqual(1 + obj1, 2)
377
378 def test_trace(self):
379 # See ticket #19456
380 old_trace_func = sys.gettrace()
381 try:
382
383 def trace_func(frame, event, arg):
384 frame.f_locals["self"].__class__
385 if old_trace_func is not None:
386 old_trace_func(frame, event, arg)
387
388 sys.settrace(trace_func)
389 self.lazy_wrap(None)
390 finally:
391 sys.settrace(old_trace_func)
392
393 def test_none(self):
394 i = [0]

Callers

nothing calls this directly

Calls 1

lazy_wrapMethod · 0.95

Tested by

no test coverage detected