Beispiel #1
0
async def test_to_list_operator(observable: Observable, event_loop):
    result_box = []

    disposable = observable.pipe(to_list()).subscribe(result_box.append,
                                                      loop=event_loop)

    await disposable
Beispiel #2
0
async def test_piping(observable_12: Observable):
    """
    ProxySubject instance by default just passes everything it gets further
    so the result should be the same as without the pipe
    """
    result_box = []

    disposable = observable_12.pipe(ProxySubject()).subscribe(
        result_box.append)
    await disposable

    assert result_box == [1, 2]