def test_enable_then_disable():
    original_stderr_id, original_stdout_id = id(sys.stderr), id(sys.stdout)

    assert not Windows.is_enabled()
    assert Windows.enable()
    assert original_stderr_id != id(sys.stderr)
    assert original_stdout_id != id(sys.stdout)

    assert Windows.disable()
    assert original_stderr_id == id(sys.stderr)
    # assert original_stdout_id == id(sys.stdout)  # pytest does some weird shit.
Test enabling then disabling on Windows.
dataset/ETHPy150Open Robpol86/colorclass/tests/test_windows.py/test_enable_then_disable