def test_single_or_default_async_predicate_empty(self):
        scheduler = TestScheduler()
        xs = scheduler.create_hot_observable(on_next(150, 1), on_completed(250))

        def create():
            def predicate(x):
                return x % 2 == 1
            return xs.single_or_default(predicate, 0)

        res = scheduler.start(create=create)

        res.messages.assert_equal(on_next(250, 0), on_completed(250))
        xs.subscriptions.assert_equal(subscribe(200, 250))
dataset/ETHPy150Open ReactiveX/RxPY/tests/test_observable/test_singleordefault.py/TestSingleOrDefault.test_single_or_default_async_predicate_empty/original