MCPcopy Index your code
hub / github.com/python/cpython / test_mixed_cmp

Method test_mixed_cmp

Lib/test/test_bytes.py:2373–2379  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2371 contains_bytes = True
2372
2373 def test_mixed_cmp(self):
2374 a = self.type2test(b'ab')
2375 for t in bytes, bytearray, BytesSubclass, ByteArraySubclass:
2376 with self.subTest(t.__name__):
2377 self._assert_cmp(a, t(b'ab'), 0)
2378 self._assert_cmp(a, t(b'a'), 1)
2379 self._assert_cmp(a, t(b'ac'), -1)
2380
2381class ByteArrayAsStringTest(FixedStringTest, unittest.TestCase):
2382 type2test = bytearray

Callers

nothing calls this directly

Calls 4

tFunction · 0.85
type2testMethod · 0.80
subTestMethod · 0.45
_assert_cmpMethod · 0.45

Tested by

no test coverage detected