예제 #1
0
 def test_commonprefix_full(self):
     pd = PrefixSet(['abcd'])
     self.assertEqual('abcd', pd.commonprefix('abcd'))
예제 #2
0
 def test_commonprefix_half(self):
     pd = PrefixSet(['abcd'])
     self.assertEqual(b'ab', pd.commonprefix('abef'))
예제 #3
0
 def test_commonprefix_empty(self):
     pd = PrefixSet(['abcd'])
     self.assertEqual(b'', pd.commonprefix('efgh'))
 def test_commonprefix_full(self):
     pd = PrefixSet(["abcd"])
     self.assertEqual("abcd", pd.commonprefix("abcd"))
 def test_commonprefix_half(self):
     pd = PrefixSet(["abcd"])
     self.assertEqual(b"ab", pd.commonprefix("abef"))
 def test_commonprefix_empty(self):
     pd = PrefixSet(["abcd"])
     self.assertEqual(b"", pd.commonprefix("efgh"))