Ejemplo n.º 1
0
def test_compression_results_match(input_type):
    print '%s ' % input_type.__name__,
    groupby_results = groupby_compress(input_type())
    iterative_results = iterative_compress(input_type())
    assert groupby_results == iterative_results
Ejemplo n.º 2
0
def test_compression_results_match(input_type):
    print "%s " % input_type.__name__,
    groupby_results = groupby_compress(input_type())
    iterative_results = iterative_compress(input_type())
    assert groupby_results == iterative_results
Ejemplo n.º 3
0
def test_iterative_compress(simple_string):
    compressed = [(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e')]
    assert iterative_compress(simple_string) == compressed
Ejemplo n.º 4
0
def test_iterative_compress(simple_string):
    compressed = [(1, "a"), (2, "b"), (3, "c"), (4, "d"), (5, "e")]
    assert iterative_compress(simple_string) == compressed