def test_first(): colors = SingleLinkedList() colors.push("Cadmium Red Light") assert colors.first() == "Cadmium Red Light" colors.push("Hansa Yellow") assert colors.first() == "Cadmium Red Light" colors.shift("Pthalo Green") assert colors.first() == "Pthalo Green"
def test_first(self): colors = SingleLinkedList() colors.push('Cadmium Red Light') assert colors.first() == 'Cadmium Red Light' colors.push('Hansa Yellow') assert colors.first() == 'Cadmium Red Light' colors.shift('Pthalo Green') assert colors.first() == 'Pthalo Green'
def test_first(): colors = SingleLinkedList() colors.push('red') assert colors.first() == 'red' colors.push('yellow') assert colors.first() == 'red' colors.push('blue') assert colors.first() == 'red'