def test_none(self):
     """grouptools.commonprefix: returns '' when no values are the same"""
     assert grouptools.commonprefix(['foo', 'bar']) == ''
 def test_basic(self):
     expected = grouptools.commonprefix([
         grouptools.join('g1', 'g2', '1'),
         grouptools.join('g1', 'g2', '2')
     ])
     assert expected == grouptools.join('g1', 'g2')
 def test_empty(self):
     """grouptools.commonprefix: handles an empty value"""
     actual = grouptools.commonprefix((grouptools.join('foo', 'bar'), ''))
     assert actual == ''
Beispiel #4
0
def test_commonprefix_none():
    """grouptools.commonprefix: returns '' when no values are the same"""
    nt.eq_('', grouptools.commonprefix(['foo', 'bar']))
Beispiel #5
0
def test_commonprefix_empty():
    """grouptools.commonprefix: handles an empty value"""
    expected = ''
    value = grouptools.commonprefix((grouptools.join('foo', 'bar'), ''))

    nt.eq_(expected, value)
Beispiel #6
0
def test_commonprefix_none():
    """grouptools.commonprefix: returns '' when no values are the same"""
    nt.eq_('', grouptools.commonprefix(['foo', 'bar']))
Beispiel #7
0
def test_commonprefix_empty():
    """grouptools.commonprefix: handles an empty value"""
    expected = ''
    value = grouptools.commonprefix((grouptools.join('foo', 'bar'), ''))

    nt.eq_(expected, value)