File: test_concat_repeat.py

package info (click to toggle)
python-rx 4.0.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,056 kB
  • sloc: python: 39,070; javascript: 77; makefile: 24
file content (17 lines) | stat: -rw-r--r-- 506 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import unittest

from reactivex import operators as ops
from reactivex.testing.marbles import marbles_testing


class TestConcatIntegration(unittest.TestCase):
    def test_concat_repeat(self):
        with marbles_testing() as (start, cold, hot, exp):
            e1 = cold("-e11-e12|")
            e2 = cold("-e21-e22|")
            ex = exp("-e11-e12-e21-e22-e11-e12-e21-e22|")

            obs = e1.pipe(ops.concat(e2), ops.repeat(2))

            results = start(obs)
            assert results == ex