示例#1
0
 def test_to_bytes_error(self):
     with pytest.raises(TypeError, match="not expecting type int"):
         to_bytes(1)
示例#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]
示例#3
0
 def test_to_bytes(self, input, params, expected):
     assert to_bytes(input, **params) == expected
示例#4
0
 def test_to_bytes(self, input: Union[bytes, str], params: Dict[str, str],
                   expected: bytes) -> None:
     assert to_bytes(input, **params) == expected