MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_comparisons

Method test_comparisons

Lib/test/test_deque.py:132–147  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

listClass · 0.85
popleftMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected