Beispiel #1
0
def map_nocurry_test():
    assert_iterables_equal(map(add1, [1, 2, 3]), [2, 3, 4])
Beispiel #2
0
def chain_nocurry_test():
    assert_iterables_equal(chain(to_two, [1, 2, 3]), [1, 1, 2, 2, 3, 3])
Beispiel #3
0
def values_test():
    assert_iterables_equal(set(values(test_dict)), set([1, 3, 2]))
Beispiel #4
0
def cons_curry_test():
    assert_iterables_equal(cons(1)([2, 3]), [1, 2, 3])
Beispiel #5
0
def filter_nocurry_test():
    assert_iterables_equal(filter(positive, [2, -1, 0, 3, -2]), [2, 3])
Beispiel #6
0
def keys_test():
    assert_iterables_equal(keys(test_dict), set(["a", "c", "b"]))
Beispiel #7
0
def values_test():
    assert_iterables_equal(set(values(test_dict)), set([1, 3, 2]))
Beispiel #8
0
def keys_test():
    assert_iterables_equal(keys(test_dict), set(["a", "c", "b"]))
Beispiel #9
0
def drop_curry_test():
    assert_iterables_equal(drop(2)([1, 2, 3, 4]), [3, 4])
Beispiel #10
0
def concat_curry_test():
    assert_iterables_equal(concat([1, 2])([3, 4]), [1, 2, 3, 4])
Beispiel #11
0
def take_curry_test():
    assert_iterables_equal(take(2)([1, 2, 3, 4]), [1, 2])