Commit 107d4e89 authored by Robin Obůrka's avatar Robin Obůrka

tests: Improve anything-fancy-expected tests

parent c82f1cb2
...@@ -19,8 +19,9 @@ def test_bad_payload(good_type): ...@@ -19,8 +19,9 @@ def test_bad_payload(good_type):
encoded = sn.encode_msg(good_type, ("I", "am", "a", "tuple")) encoded = sn.encode_msg(good_type, ("I", "am", "a", "tuple"))
def test_good_type(good_types, good_payload): def test_good_type(good_types, good_payload):
# I mean: "Not raise any exception"
(t, p) = sn.encode_msg(good_types, good_payload) (t, p) = sn.encode_msg(good_types, good_payload)
assert t
assert p
def test_invalid_type(bad_types, good_payload): def test_invalid_type(bad_types, good_payload):
with pytest.raises(sn.InvalidMsgError): with pytest.raises(sn.InvalidMsgError):
...@@ -25,8 +25,9 @@ def test_broken_payload(broken_msg): ...@@ -25,8 +25,9 @@ def test_broken_payload(broken_msg):
(t, p) = sn.parse_msg(broken_msg) (t, p) = sn.parse_msg(broken_msg)
def test_good_type(good_type_msg): def test_good_type(good_type_msg):
# I mean: "Not raise any exception"
(t, p) = sn.parse_msg(good_type_msg) (t, p) = sn.parse_msg(good_type_msg)
assert t
assert p
def test_invalid_type(broken_type_msg): def test_invalid_type(broken_type_msg):
with pytest.raises(sn.InvalidMsgTypeError): with pytest.raises(sn.InvalidMsgTypeError):
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