def test_kth_same_length():
    list = LinkedList()
    list.append(1)
    list.append(2)
    list.append(3)
    with pytest.raises(Exception):
        assert list.get_kth_value(3)
def test_kth_negative():
    list = LinkedList()
    list.append(1)
    list.append(2)
    list.append(3)
    with pytest.raises(Exception):
        assert list.get_kth_value(-1)
def test_kth_greater():
    list = LinkedList()
    list.append(1)
    list.append(2)
    list.append(3)
    with pytest.raises(Exception):
        assert list.get_kth_value(5)
def test_kth_middle():
    list = LinkedList()
    list.append(1)
    list.append(2)
    list.append(3)
    assert list.get_kth_value(1) == 2
def test_kth_size_one():
    list = LinkedList()
    list.append(1)
    assert list.get_kth_value(0) == 1