Total Complexity | 1 |
Total Lines | 18 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from async_rx import Observable, Observer, rx_of |
||
2 | |||
3 | from ..model import ObserverCounterCollector |
||
4 | |||
5 | |||
6 | def test_rx_of(kernel): |
||
7 | |||
8 | obs: Observable = rx_of(1, 2, 3) |
||
9 | |||
10 | seeker = ObserverCounterCollector() |
||
11 | |||
12 | kernel.run(obs.subscribe(seeker)) |
||
13 | |||
14 | assert seeker.on_next_count == 3 |
||
15 | assert seeker.on_completed_count == 1 |
||
16 | assert seeker.on_error_count == 0 |
||
17 | assert seeker.items == [1, 2, 3] |
||
18 |