def test_can_pop_any_position(self): vector = Vector(2, 5, 1) val = vector.pop(1) self.assertEqual(val, 5) self.assertEqual(vector._values, [2, 1])
def test_can_pop_value(self): vector = Vector(2, 5, 1) val = vector.pop() self.assertEqual(val, 1) self.assertEqual(vector._values, [2, 5])