def test_take_partitions():
    """The real test here is that only the first two partitions should be
    computed and not the third one. Shown in debug logs."""
    my_rdd = Context().parallelize([4, 7, 2], 3)
    assert my_rdd.take(2)[1] == 7
def test_take():
    my_rdd = Context().parallelize([4, 7, 2])
    assert my_rdd.take(2)[1] == 7