def test_reverse_suffix_duplicates(): suffix = lambda x: tuple(vfs._reverse_suffix_duplicates(x)) wvpasseq(('x',), suffix(('x',))) wvpasseq(('x', 'y'), suffix(('x', 'y'))) wvpasseq(('x-1', 'x-0'), suffix(('x',) * 2)) wvpasseq(['x-%02d' % n for n in reversed(range(11))], list(suffix(('x',) * 11))) wvpasseq(('x-1', 'x-0', 'y'), suffix(('x', 'x', 'y'))) wvpasseq(('x', 'y-1', 'y-0'), suffix(('x', 'y', 'y'))) wvpasseq(('x', 'y-1', 'y-0', 'z'), suffix(('x', 'y', 'y', 'z')))
def test_reverse_suffix_duplicates(): suffix = lambda x: tuple(vfs._reverse_suffix_duplicates(x)) wvpasseq(('x', ), suffix(('x', ))) wvpasseq(('x', 'y'), suffix(('x', 'y'))) wvpasseq(('x-1', 'x-0'), suffix(('x', ) * 2)) wvpasseq(['x-%02d' % n for n in reversed(range(11))], list(suffix(('x', ) * 11))) wvpasseq(('x-1', 'x-0', 'y'), suffix(('x', 'x', 'y'))) wvpasseq(('x', 'y-1', 'y-0'), suffix(('x', 'y', 'y'))) wvpasseq(('x', 'y-1', 'y-0', 'z'), suffix(('x', 'y', 'y', 'z')))