Ejemplo n.º 1
0
def test_simple(simple_string):
    assert firstlast(simple_string) == 'ad'
Ejemplo n.º 2
0
def test_element_0(simple_string):
    assert firstlast(simple_string)[0] == 'a'
Ejemplo n.º 3
0
def test_first_last_list():
    assert firstlast([1, 2, 3, 4]) == [1, 4]
Ejemplo n.º 4
0
def test_first_last_string():
    assert firstlast("abcd") == "ad"
Ejemplo n.º 5
0
def test_first_last_tuple():
    assert firstlast((1, 2, 3, 4)) == (1, 4)