示例#1
0
文件: test_min.py 项目: lizh06/RxPY
 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)]
示例#2
0
文件: test_min.py 项目: lizh06/RxPY
 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)]
示例#3
0
文件: test_min.py 项目: lizh06/RxPY
 def create():
     return xs.pipe(ops.min(comparer))
示例#4
0
文件: test_min.py 项目: lizh06/RxPY
 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 == []
示例#5
0
文件: test_min.py 项目: lizh06/RxPY
 def create():
     return xs.pipe(ops.min())