def test_extend(self, evt, loop):
        async def corofunc():
            pass

        coro = corofunc()
        coro2 = corofunc()
        # silence "coroutine never awaited" warnings
        loop.run_until_complete(coro)
        loop.run_until_complete(coro2)

        rval = event.ReturnValue(append_events=[evt])
        rval2 = event.ReturnValue(eat=True, schedule={coro})
        rval3 = event.ReturnValue(append_events=[evt], insert_events=[evt],
                                  schedule={coro, coro2})

        rset = event.ResultSet()
        rset2 = event.ResultSet()

        rset.extend(rval)
        assert not rset.eat
        assert rset.append_events == [evt]
        rset.extend(rval2)
        assert rset.eat
        assert rset.schedule == {coro}
        rset2.extend(rval3)
        rset.extend(rset2)
        rset.extend(None)
        assert rset.eat
        assert rset.append_events == [evt, evt]
        assert rset.insert_events == [evt]
        assert rset.schedule == {coro, coro2}