def test_to_bytes_error(self): with pytest.raises(TypeError, match="not expecting type int"): to_bytes(1)
def test_to_bytes_error(self) -> None: with pytest.raises(TypeError, match="not expecting type int"): to_bytes(1) # type: ignore[arg-type]
def test_to_bytes(self, input, params, expected): assert to_bytes(input, **params) == expected
def test_to_bytes(self, input: Union[bytes, str], params: Dict[str, str], expected: bytes) -> None: assert to_bytes(input, **params) == expected