def test_invalid_key_type(self): with pytest.raises(TypeError, match="key must be bytes"): Camellia(u"0" * 32)
def test_key_size(self, key, keysize): cipher = Camellia(binascii.unhexlify(key)) assert cipher.key_size == keysize
def test_invalid_key_size(self): with pytest.raises(ValueError): Camellia(binascii.unhexlify(b"0" * 12))
def test_invalid_key_type(self): with pytest.raises(TypeError, match="key must be bytes"): Camellia("0" * 32) # type: ignore[arg-type]