def test_cleanup(windows_bash_session):
    """Test proper cleanup of resources (runspace)."""
    # Session should be initialized before close
    assert windows_bash_session._initialized
    assert windows_bash_session.runspace is not None

    # Close the session
    windows_bash_session.close()

    # Verify cleanup
    assert not windows_bash_session._initialized
    assert windows_bash_session.runspace is None
    assert windows_bash_session._closed
Test proper cleanup of resources (runspace).
tests/unit/test_windows_bash.py