(self)
| 130 | self.assertEqual(d.count(None), 16) |
| 131 | |
| 132 | def test_comparisons(self): |
| 133 | d = deque('xabc') |
| 134 | d.popleft() |
| 135 | for e in [d, deque('abc'), deque('ab'), deque(), list(d)]: |
| 136 | self.assertEqual(d==e, type(d)==type(e) and list(d)==list(e)) |
| 137 | self.assertEqual(d!=e, not(type(d)==type(e) and list(d)==list(e))) |
| 138 | |
| 139 | args = map(deque, ('', 'a', 'b', 'ab', 'ba', 'abc', 'xba', 'xabc', 'cba')) |
| 140 | for x in args: |
| 141 | for y in args: |
| 142 | self.assertEqual(x == y, list(x) == list(y), (x,y)) |
| 143 | self.assertEqual(x != y, list(x) != list(y), (x,y)) |
| 144 | self.assertEqual(x < y, list(x) < list(y), (x,y)) |
| 145 | self.assertEqual(x <= y, list(x) <= list(y), (x,y)) |
| 146 | self.assertEqual(x > y, list(x) > list(y), (x,y)) |
| 147 | self.assertEqual(x >= y, list(x) >= list(y), (x,y)) |
| 148 | |
| 149 | def test_contains(self): |
| 150 | n = 200 |
nothing calls this directly
no test coverage detected