MCPcopy
hub / github.com/django/django / test_lazy_mod_str

Method test_lazy_mod_str

tests/utils_tests/test_functional.py:215–220  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

213 self.assertEqual(lazy_4() % lazy_5(), 4)
214
215 def test_lazy_mod_str(self):
216 lazy_a = lazy(lambda: "a%s", str)
217 lazy_b = lazy(lambda: "b", str)
218 self.assertEqual("a%s" % lazy_b(), "ab")
219 self.assertEqual(lazy_a() % "b", "ab")
220 self.assertEqual(lazy_a() % lazy_b(), "ab")
221
222 def test_lazy_mul_int(self):
223 lazy_4 = lazy(lambda: 4, int)

Callers

nothing calls this directly

Calls 1

lazyFunction · 0.90

Tested by

no test coverage detected