Skip to content

Suppress terminal logging in CI tests #504

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Feb 5, 2025

Suppress terminal logging in CI tests.

The approached I followed: I set logger.level = -1 for CI tests.

Fix #503.

Agent tests:

  • Before:
tests/test_agents.py::TestMultiStepAgent::test_logging_to_terminal_is_disabled FAILED
tests/test_agents.py::TestMultiStepAgent::test_step_number ╭────────────────────────────────── New run ───────────────────────────────────╮
│                                                                              │
│ Test task                                                                    │
│                                                                              │
╰─ MagicMock - <MagicMock name='mock.model_id' id='140456269450064'> ──────────╯
PASSED
tests/test_agents.py::TestMultiStepAgent::test_planning_step_first_step ───────────────────────────────── Initial plan ─────────────────────────────────
Here is the plan of action that I will follow to solve the task:
```
<MagicMock name='mock().content' id='140456269040704'>
```
PASSED
  • With this PR:
tests/test_agents.py::TestMultiStepAgent::test_logging_to_terminal_is_disabled PASSED
tests/test_agents.py::TestMultiStepAgent::test_step_number PASSED
tests/test_agents.py::TestMultiStepAgent::test_planning_step_first_step PASSED

Copy link
Contributor

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great change, thanks @albertvillanova !

@albertvillanova albertvillanova merged commit ce5ede8 into huggingface:main Feb 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] CI test results are obscured with terminal logging messages
2 participants