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