def test_on_completed_accept_action(): obs = [False] n1 = OnCompleted() def on_next(x): assert(False) return None def on_error(ex): assert(False) return None def on_completed(): obs[0] = True return obs[0] n1.accept(on_next, on_error, on_completed) assert(obs[0])
def test_on_completed_accept_action(): obs = False n1 = OnCompleted() def on_next(x): assert(False) return None def on_error(ex): assert(False) return None def on_completed(): nonlocal obs obs = True return obs n1.accept(on_next, on_error, on_completed) assert(obs)
def test_on_completed_accept_action(): obs = [False] n1 = OnCompleted() def on_next(x): assert (False) return None def on_error(ex): assert (False) return None def on_completed(): obs[0] = True return obs[0] n1.accept(on_next, on_error, on_completed) assert (obs[0])
def test_on_completed_accept_action(): obs = False n1 = OnCompleted() def on_next(x): assert (False) return None def on_error(ex): assert (False) return None def on_completed(): nonlocal obs obs = True return obs n1.accept(on_next, on_error, on_completed) assert (obs)
def test_on_completed_accept_action_with_result(): n1 = OnCompleted() def on_next(x): assert(False) return None def on_error(ex): assert(False) return None def on_completed(): return "OK" res = n1.accept(on_next, on_error, on_completed) assert('OK' == res)
def test_on_completed_accept_action_with_result(): n1 = OnCompleted() def on_next(x): assert (False) return None def on_error(ex): assert (False) return None def on_completed(): return "OK" res = n1.accept(on_next, on_error, on_completed) assert ('OK' == res)
def test_on_completed_accept_observer(): obs = CheckOnCompletedObserver() n1 = OnCompleted() n1.accept(obs) assert(obs.completed)
def test_on_completed_accept_observer(): obs = CheckOnCompletedObserver() n1 = OnCompleted() n1.accept(obs) assert (obs.completed)