def test_maybe_stream(s, expected): got = yield read_full(tpeer.maybe_stream(s)) assert expected == got