def test_peek_non_empty(self): deque = ArrayDeque() deque.insert(1) self.assertEqual(deque.peek(), 1)
def test_peek_empty(self): deque = ArrayDeque() with self.assertRaises(ValueError): deque.peek()