def test_bytes(self): res = t.FromBytes().check(b"foo") assert res == 'foo' res = t.FromBytes()(b"") assert res == '' res = t.FromBytes().check(b"") assert res == '' res = extract_error(t.FromBytes(), 1) assert res == 'value is not a bytes'
def test_repr(self): res = t.FromBytes() assert repr(res) == '<FromBytes>'