diff options
author | Ryo Nakamura <upa@haeena.net> | 2023-03-15 22:20:00 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2023-03-15 22:20:00 +0900 |
commit | 2fdfa7b8307f490efe18ed3de4eadbd2bba0a4e6 (patch) | |
tree | cf3dc7f87ea61fa0614554313dcdde55a15e6b36 /test/test_python.py | |
parent | f5d0f526f21f0a8428906789af5898662216032d (diff) |
test: add invalid kwargs test
Diffstat (limited to 'test/test_python.py')
-rw-r--r-- | test/test_python.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test_python.py b/test/test_python.py index 3ac2a6e..ea2d278 100644 --- a/test/test_python.py +++ b/test/test_python.py @@ -103,3 +103,22 @@ def test_login_failed(): m = mscp.mscp(remote, mscp.LOCAL2REMOTE, port = "65534") with pytest.raises(RuntimeError) as e: m.connect() + + +param_invalid_kwargs = [ + { "nr_threads": -1 }, + { "nr_ahead": -1 }, + { "min_chunk_sz": 1 }, + { "max_chunk_sz": 1 }, + { "coremask": "xxxxx" }, + { "max_startups": -1 }, + { "cipher": "invalid" }, + { "hmac": "invalid"}, + { "compress": "invalid"}, +] + +@pytest.mark.parametrize("kw", param_invalid_kwargs) +def test_invalid_options(kw): + with pytest.raises(RuntimeError) as e: + m = mscp.mscp("localhost", mscp.LOCAL2REMOTE, **kw) + m.connect() |