예제 #1
0
 def test_commonsuffix(self):
     _assert(
         strutil.commonsuffix([
             "foo",
             "foobarooo",
             "foosplat",
         ]) == '', strutil.commonsuffix([
             "foo",
             "foobarooo",
             "foosplat",
         ]))
     _assert(
         strutil.commonsuffix([
             "foo",
             "foobarooo",
             "foosplato",
         ]) == 'o', strutil.commonsuffix([
             "foo",
             "foobarooo",
             "foosplato",
         ]))
     _assert(
         strutil.commonsuffix([
             "foo",
             "foobarooofoo",
             "foosplatofoo",
         ]) == 'foo',
         strutil.commonsuffix([
             "foo",
             "foobarooofoo",
             "foosplatofoo",
         ]))
예제 #2
0
 def test_commonsuffix(self):
     _assert(strutil.commonsuffix(["foo","foobarooo", "foosplat",]) == '', strutil.commonsuffix(["foo","foobarooo", "foosplat",]))
     _assert(strutil.commonsuffix(["foo","foobarooo", "foosplato",]) == 'o', strutil.commonsuffix(["foo","foobarooo", "foosplato",]))
     _assert(strutil.commonsuffix(["foo","foobarooofoo", "foosplatofoo",]) == 'foo', strutil.commonsuffix(["foo","foobarooofoo", "foosplatofoo",]))