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