コード例 #1
0
 def test_peek_non_empty(self):
     deque = ArrayDeque()
     deque.insert(1)
     self.assertEqual(deque.peek(), 1)
コード例 #2
0
 def test_peek_empty(self):
     deque = ArrayDeque()
     with self.assertRaises(ValueError):
         deque.peek()