

def test_anonymousdisposable_dispose():
    disposed = [False]

    def action():
        disposed[0] = True
    d = Disposable(action)
    assert (not disposed[0])
    d.dispose()
    assert disposed[0]

dataset/ETHPy150Open ReactiveX/RxPY/tests/test_disposables/test_disposable.py test_anonymousdisposable_dispose/original