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

Method test_bytearray

Lib/test/test_hmac.py:1414–1425  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1412 self.assert_digest_equal(a, b)
1413
1414 def test_bytearray(self):
1415 # Testing bytearrays of same lengths, same values
1416 a, b = bytearray(b"foobar"), bytearray(b"foobar")
1417 self.assert_digest_equal(a, b)
1418
1419 # Testing bytearrays of different lengths
1420 a, b = bytearray(b"foobar"), bytearray(b"foo")
1421 self.assert_digest_not_equal(a, b)
1422
1423 # Testing bytearrays of same lengths, different values
1424 a, b = bytearray(b"foobar"), bytearray(b"foobaz")
1425 self.assert_digest_not_equal(a, b)
1426
1427 def test_mixed_types(self):
1428 # Testing byte and bytearray of same lengths, same values

Callers

nothing calls this directly

Calls 2

assert_digest_equalMethod · 0.95

Tested by

no test coverage detected