Esempio n. 1
0
 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)]
Esempio n. 2
0
 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)]
Esempio n. 3
0
 def create():
     return xs.pipe(ops.min(comparer))
Esempio n. 4
0
 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 == []
Esempio n. 5
0
 def create():
     return xs.pipe(ops.min())