Commit fb8a2896 authored by Robin Obůrka's avatar Robin Obůrka

tests: Add few more tests (good points from coverage.py)

parent e9ef1273
......@@ -19,6 +19,7 @@ def empty_args():
"--resource res,connect,FOO,sentinel.cz,7700",
"--resource res,connect,PUSH,sentinel.cz,0",
"--resource res,connect,PUSH,*,8800",
"--resource res,conn,PUSH,127.0.0.1,8800",
"--resource res,connect,PUSH,localhost,8800"
" --resource res,connect,PUSH,localhost,8800",
"--resource res,bind,PULL,localhost,8800"
......
......@@ -9,6 +9,10 @@ def test_empty_args(arg_parser, empty_args):
with pytest.raises(SystemExit):
arg_parser.parse_args(empty_args)
def test_empty_args_native(zmq_context):
with pytest.raises(SystemExit):
ctx = sn.SN(zmq_context)
def test_bad_args(zmq_context, arg_parser, bad_args):
with pytest.raises((SystemExit, sn.SockConfigError, zmq.error.ZMQError)):
ctx = sn.SN(zmq_context, arg_parser, args=bad_args)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment