Skip to content

Conversation

@privateip
Copy link
Member

  • Add filterwarnings config in pyproject.toml to suppress RuntimeWarning for unawaited coroutines from mock objects
  • Suppress ResourceWarning from mock file handlers in logging tests
  • Refactor asyncio.run mocks to properly consume coroutines and prevent warnings
  • Add autouse fixture in test_logging to clean up file handlers after each test
  • Replace patch decorators with inline MagicMock for cleaner mock configuration

- Add filterwarnings config in pyproject.toml to suppress RuntimeWarning for unawaited coroutines from mock objects
- Suppress ResourceWarning from mock file handlers in logging tests
- Refactor asyncio.run mocks to properly consume coroutines and prevent warnings
- Add autouse fixture in test_logging to clean up file handlers after each test
- Replace patch decorators with inline MagicMock for cleaner mock configuration
@privateip privateip requested a review from a team as a code owner December 30, 2025 04:32
@privateip privateip merged commit 350b58b into itential:devel Dec 30, 2025
4 checks passed
@privateip privateip deleted the test-warnings branch December 30, 2025 04:52
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.

1 participant