Passed
Push — master ( 5304dc...5eaab6 )
by Guibert
02:41
created

tests.observables.test_rx_of   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 18
rs 10
c 0
b 0
f 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