Esempio n. 1
0
 def test_startswith(self):
     pd = PrefixDict()
     keys = [''.join(combo) for combo in itertools.product('abc', repeat=3)]
     for key in reversed(keys):
         pd[key] = None
     subset = [k for k in keys if k.startswith('ab')]
     self.assertSequenceEqual(subset, list(pd.startswith('ab')))
Esempio n. 2
0
 def test_startswith(self):
     pd = PrefixDict()
     keys = [''.join(combo) for combo in itertools.product('abc', repeat=3)]
     for key in reversed(keys):
         pd[key] = None
     subset = [k for k in keys if k.startswith('ab')]
     self.assertSequenceEqual(subset, list(pd.startswith('ab')))
Esempio n. 3
0
 def test_startswith_empty(self):
     pd = PrefixDict()
     pd['a'] = None
     self.assertSequenceEqual([], list(pd.startswith('b')))
Esempio n. 4
0
 def test_startswith_empty(self):
     pd = PrefixDict()
     pd['a'] = None
     self.assertSequenceEqual([], list(pd.startswith('b')))