Esempio n. 1
0
 def test_to_bytes_error(self):
     with pytest.raises(TypeError, match="not expecting type int"):
         to_bytes(1)
Esempio 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]
Esempio n. 3
0
 def test_to_bytes(self, input, params, expected):
     assert to_bytes(input, **params) == expected
Esempio 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