MCPcopy
hub / github.com/keon/algorithms / test_word_pattern

Method test_word_pattern

tests/test_map.py:157–161  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

155
156class TestWordPattern(unittest.TestCase):
157 def test_word_pattern(self):
158 self.assertTrue(word_pattern("abba", "dog cat cat dog"))
159 self.assertFalse(word_pattern("abba", "dog cat cat fish"))
160 self.assertFalse(word_pattern("abba", "dog dog dog dog"))
161 self.assertFalse(word_pattern("aaaa", "dog cat cat dog"))
162
163
164class TestIsSomorphic(unittest.TestCase):

Callers

nothing calls this directly

Calls 1

word_patternFunction · 0.90

Tested by

no test coverage detected