def test_text_round_trip(args): # workaround for pytest-dev/pytest#1086 until pytest 2.8.2 is released. s, val, out = args if out is None: out = s wire_val = TextTypeSpec.to_wire(s) assert wire_val == BinaryValue(val) assert TextTypeSpec.from_wire(wire_val) == out