def test_global_session_limit_evaluation(mock_logger):
    from GramAddict.core.session_state import SessionState
    from tests.conftest import MockArgs, MockConfigs

    args = MockArgs(total_likes_limit=100, total_follows_limit=100, total_interactions_limit=1000)
    configs = MockConfigs(args)
    session_state = SessionState(configs)
    session_state.set_limits_session()

    # Simulate a fresh session - Limit should NOT be reached
    limit_tuple_clean = session_state.check_limit(SessionState.Limit.ALL)
    assert not any(limit_tuple_clean), "Fresh session should not evaluate to true for limits"

    # Exhaust global limit
    for _ in range(1001):
        session_state.add_interaction("Feed", succeed=True, followed=False, scraped=False)

    limit_tuple_exhausted = session_state.check_limit(SessionState.Limit.ALL)
    assert any(limit_tuple_exhausted), "Exhausted session MUST evaluate to true for limits"
