def test_cons_slicing():
    cons = HyCons("car", "cdr")
    assert cons[0] == "car"
    assert cons[1:] == "cdr"
    try:
        cons[:]
        assert True is False
    except IndexError:
        pass

    try:
        cons[1]
        assert True is False
    except IndexError:
        pass
Restore the old state of the user interface and dependency graph.
dataset/ETHPy150Open hylang/hy/tests/models/test_cons.py/test_cons_slicing--crossover with--dataset/ETHPy150Open andrew-gardner/dependsworkflow/depends/depends_undo_commands.py/DagAndSceneUndoCommand.undo