

def test_refcountdisposable_primarydisposesfirst():
    d = BooleanDisposable()
    r = RefCountDisposable(d)
    assert (not d.is_disposed)
    d1 = r.disposable
    d2 = r.disposable
    assert (not d1.is_disposed)
    d1.dispose()
    assert (not d.is_disposed)
    r.dispose()
    assert (not d.is_disposed)
    d2.dispose()
    assert d.is_disposed

dataset/ETHPy150Open ReactiveX/RxPY/tests/test_disposables/test_disposable.py test_refcountdisposable_primarydisposesfirst/VarMisuse@45/64 `d`->`d1`