def test_min_int32_on_error(self): ex = "ex" scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(150, 1), on_error(210, ex)) res = scheduler.start(create=lambda: xs.pipe(ops.min())).messages assert res == [on_error(210, ex)]
def test_min_int32_some(self): scheduler = TestScheduler() xs = scheduler.create_hot_observable( on_next(150, 1), on_next(210, 2), on_next(220, 3), on_next(230, 4), on_completed(250), ) res = scheduler.start(create=lambda: xs.pipe(ops.min())).messages assert res == [on_next(250, 2), on_completed(250)]
def create(): return xs.pipe(ops.min(comparer))
def test_min_int32_never(self): scheduler = TestScheduler() xs = scheduler.create_hot_observable(on_next(150, 1)) res = scheduler.start(create=lambda: xs.pipe(ops.min())).messages assert res == []
def create(): return xs.pipe(ops.min())