def create(): def create_resource(): dispose_invoked[0] += 1 raise _raise(ex) def create_observable(d): create_invoked[0] += 1 return reactivex.never() return reactivex.using(create_resource, create_observable)
def create(): def create_resource(): dispose_invoked[0] += 1 disp[0] = MockDisposable(scheduler) return disp[0] def create_observable(d): create_invoked[0] += 1 _raise(ex) return reactivex.using(create_resource, create_observable)
def create(): def create_resource(): dispose_invoked[0] += 1 disp[0] = MockDisposable(scheduler) return disp[0] def create_observable(d): _d[0] = d create_invoked[0] += 1 xs[0] = scheduler.create_cold_observable( on_next(100, scheduler.clock), on_error(200, ex)) return xs[0] return reactivex.using(create_resource, create_observable)
def create(): def create_resources(): dispose_invoked[0] += 1 disp[0] = None return disp[0] def create_observable(d): _d[0] = d create_invoked[0] += 1 xs[0] = scheduler.create_cold_observable( on_next(100, scheduler.clock), on_completed(200)) return xs[0] return reactivex.using(create_resources, create_observable)