Example #1
0
 def test_commonprefix_full(self):
     pd = PrefixDict(abcd=None)
     self.assertEqual('abcd', pd.commonprefix('abcd'))
Example #2
0
 def test_commonprefix_empty(self):
     pd = PrefixDict(abcd=None)
     self.assertEqual(b'', pd.commonprefix('efgh'))
Example #3
0
 def test_commonprefix_half(self):
     pd = PrefixDict(abcd=None)
     self.assertEqual(b'ab', pd.commonprefix('abef'))
Example #4
0
 def test_commonprefix_full(self):
     pd = PrefixDict(abcd=None)
     self.assertEqual('abcd', pd.commonprefix('abcd'))
Example #5
0
 def test_commonprefix_half(self):
     pd = PrefixDict(abcd=None)
     self.assertEqual(b'ab', pd.commonprefix('abef'))
Example #6
0
 def test_commonprefix_empty(self):
     pd = PrefixDict(abcd=None)
     self.assertEqual(b'', pd.commonprefix('efgh'))
 def commonsuffix(self, key):
     path = PrefixDict.commonprefix(self, key, restore_key=False)
     return path[::-1]
Example #8
0
 def commonsuffix(self, key):
     path = PrefixDict.commonprefix(self, key, restore_key=False)
     return path[::-1]