MCPcopy
hub / github.com/django/django / test_ngettext_lazy_pickle

Method test_ngettext_lazy_pickle

tests/i18n/tests.py:389–395  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

387 self.assertFalse(ngettext_lazy("", ""))
388
389 def test_ngettext_lazy_pickle(self):
390 s1 = ngettext_lazy("%d good result", "%d good results")
391 self.assertEqual(s1 % 1, "1 good result")
392 self.assertEqual(s1 % 8, "8 good results")
393 s2 = pickle.loads(pickle.dumps(s1))
394 self.assertEqual(s2 % 1, "1 good result")
395 self.assertEqual(s2 % 8, "8 good results")
396
397 @override_settings(LOCALE_PATHS=extended_locale_paths)
398 def test_pgettext(self):

Callers

nothing calls this directly

Calls 3

ngettext_lazyFunction · 0.90
loadsMethod · 0.45
dumpsMethod · 0.45

Tested by

no test coverage detected