MCPcopy
hub / github.com/pyca/cryptography / test_non_bytes

Method test_non_bytes

tests/hazmat/primitives/test_padding.py:35–41  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

33 unpadder.finalize()
34
35 def test_non_bytes(self):
36 padder = padding.PKCS7(128).padder()
37 with pytest.raises(TypeError):
38 padder.update("abc") # type: ignore[arg-type]
39 unpadder = padding.PKCS7(128).unpadder()
40 with pytest.raises(TypeError):
41 unpadder.update("abc") # type: ignore[arg-type]
42
43 def test_zany_py2_bytes_subclass(self):
44 class mybytes(bytes): # noqa: N801

Callers

nothing calls this directly

Calls 3

padderMethod · 0.45
updateMethod · 0.45
unpadderMethod · 0.45

Tested by

no test coverage detected