def test_zipped_list():
    ll1 = LinkedList(Node('1', Node('3', Node('5'))))
    ll2 = LinkedList(Node('2', Node('4', Node('6'))))
    zipped_list(ll1, ll2)
    actual = ll1.__str__()
    expected = "{'1'} ->{'2'} ->{'3'} ->{'4'} ->{'5'} ->{'6'} -> None "
    assert actual == expected
def test_insert():
    list = LinkedList(Node("Buddy"))
    assert list.head.data == "Buddy"
    list.insert('Guy')
    list.insert('Friend')
    assert list.head.data == 'Friend'
def test_head():
    node = Node('rubber')
    actual = node.next
    expected = None
    assert actual == expected
def test_if_list_includes_two():
    node = Node(50)
    actual = LinkedList(node).includes(49)
    expected = False
    assert actual == expected
def test_list_head():
    node = Node(45)
    actual = LinkedList(node).head
    expected = node
    assert actual == expected
def test_list_includes_one():
    node = Node(100)
    actual = LinkedList(node).includes(100)
    expected = True
    assert actual == expected
def node():
    return Node("some value")
def test_first_node():
    node = Node()
    actual = node.next
    expect = None
    assert actual == expect
def test_nine():
    ll = LinkedList(Node(1, Node(2, Node(3, Node(4, Node(5))))))
    actual = ll.kthFromEnd(5)
    expected = 'Same length'
    assert actual == expected
def test_eight():
    ll = LinkedList(Node(1, Node(2, Node(3, Node(4, Node(5))))))
    actual = ll.kthFromEnd(0)
    expected = 5
    assert actual == expected
def test_a():
    node1 = Node("apple")
    actual = node1.value
    expected = "apple"
    assert actual == expected
    assert node1.next == None
def test_three():
    node1 = Node("a")
    ll1 = LinkedList(node1)
    actual = ll1.head.value
    expected = "a"
    assert actual == expected
def test_twelve():
    ll = LinkedList(Node(1, Node(2, Node(3, Node(4, Node(5))))))
    actual = ll.kthFromEnd(3)
    expected = 2
    assert actual == expected
def test_eleven():
    ll = LinkedList(Node(1))
    actual = ll.kthFromEnd(0)
    expected = 1
    assert actual == expected
def test_ten():
    ll = LinkedList(Node(1, Node(2, Node(3, Node(4, Node(5))))))
    actual = ll.kthFromEnd(-1)
    expected = 'Negative numbers not allowed'
    assert actual == expected