MCPcopy Index your code
hub / github.com/faif/python-patterns / test_get_localizer_greek

Method test_get_localizer_greek

tests/creational/test_factory.py:5–11  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3
4class TestFactory(unittest.TestCase):
5 def test_get_localizer_greek(self):
6 localizer = get_localizer("Greek")
7 self.assertIsInstance(localizer, GreekLocalizer)
8 self.assertEqual(localizer.localize("dog"), "σκύλος")
9 self.assertEqual(localizer.localize("cat"), "γάτα")
10 # Test unknown word returns the word itself
11 self.assertEqual(localizer.localize("monkey"), "monkey")
12
13 def test_get_localizer_english(self):
14 localizer = get_localizer("English")

Callers

nothing calls this directly

Calls 2

get_localizerFunction · 0.90
localizeMethod · 0.45

Tested by

no test coverage detected