MCPcopy
hub / github.com/django/django / test_none

Method test_none

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

Source from the content-addressed store, hash-verified

391 sys.settrace(old_trace_func)
392
393 def test_none(self):
394 i = [0]
395
396 def f():
397 i[0] += 1
398 return None
399
400 x = SimpleLazyObject(f)
401 self.assertEqual(str(x), "None")
402 self.assertEqual(i, [1])
403 self.assertEqual(str(x), "None")
404 self.assertEqual(i, [1])
405
406 def test_dict(self):
407 # See ticket #18447

Callers

nothing calls this directly

Calls 1

SimpleLazyObjectClass · 0.90

Tested by

no test coverage detected