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

Method test_bytes

Lib/test/test_compare.py:464–479  ·  view source on GitHub ↗

Compare bytes and bytearray.

(self)

Source from the content-addressed store, hash-verified

462 self.assert_equality_only(r1, t1, False)
463
464 def test_bytes(self):
465 """Compare bytes and bytearray."""
466 bs1 = b'a1'
467 bs2 = b'b2'
468 self.assert_total_order(bs1, bs1, 0)
469 self.assert_total_order(bs1, bs2, -1)
470
471 ba1 = bytearray(b'a1')
472 ba2 = bytearray(b'b2')
473 self.assert_total_order(ba1, ba1, 0)
474 self.assert_total_order(ba1, ba2, -1)
475
476 self.assert_total_order(bs1, ba1, 0)
477 self.assert_total_order(bs1, ba2, -1)
478 self.assert_total_order(ba1, bs1, 0)
479 self.assert_total_order(ba1, bs2, -1)
480
481 def test_sets(self):
482 """Compare set and frozenset."""

Callers

nothing calls this directly

Calls 1

assert_total_orderMethod · 0.95

Tested by

no test coverage detected