コード例 #1
0
def OverlapLength_NoOverlap_test():
    eq_(0, base.OverlapLength('foobar', 'goobar'))
    eq_(0, base.OverlapLength('foobar', '(^($@#$#@'))
    eq_(0, base.OverlapLength('foo bar zoo', 'foo zoo bar'))
コード例 #2
0
def OverlapLength_LongestOverlap_test():
    eq_(7, base.OverlapLength('bar foo foo', 'foo foo bar'))
コード例 #3
0
def OverlapLength_EmptyInput_test():
    eq_(0, base.OverlapLength('', 'goobar'))
    eq_(0, base.OverlapLength('foobar', ''))
    eq_(0, base.OverlapLength('', ''))
コード例 #4
0
def OverlapLength_Substring_test():
    eq_(6, base.OverlapLength('foobar', 'foobarzoo'))
    eq_(6, base.OverlapLength('zoofoobar', 'foobar'))
コード例 #5
0
def OverlapLength_SameStrings_test():
    eq_(6, base.OverlapLength('foobar', 'foobar'))
コード例 #6
0
def OverlapLength_OneCharOverlap_test():
    eq_(1, base.OverlapLength('foo b', 'b zoo'))
コード例 #7
0
def OverlapLength_BasicWithUnicode_test():
    eq_(3, base.OverlapLength(u'bar fäö', u'fäö bar'))
    eq_(3, base.OverlapLength(u'zoofäö', u'fäözoo'))
コード例 #8
0
def OverlapLength_Basic_test():
    eq_(3, base.OverlapLength('foo bar', 'bar zoo'))
    eq_(3, base.OverlapLength('foobar', 'barzoo'))