Skip to content

test: close the pytest logger to prevent 'too many open files' problem#66

Merged
Artifizer merged 1 commit intoGlobalTypeSystem:mainfrom
Artifizer:main
Mar 5, 2026
Merged

test: close the pytest logger to prevent 'too many open files' problem#66
Artifizer merged 1 commit intoGlobalTypeSystem:mainfrom
Artifizer:main

Conversation

@Artifizer
Copy link
Copy Markdown
Contributor

@Artifizer Artifizer commented Mar 5, 2026

Summary by CodeRabbit

  • Tests
    • Improved test teardown handling to safely manage logger cleanup.
    • Enhanced test fixture configuration for more accurate base URL retrieval during test execution.

Signed-off-by: Artifizer <artifizer@gmail.com>
@Artifizer Artifizer merged commit e088287 into GlobalTypeSystem:main Mar 5, 2026
1 check passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 598b3733-b0ff-4862-bd1e-078ec542257c

📥 Commits

Reviewing files that changed from the base of the PR and between 0872bdd and fb00b7d.

📒 Files selected for processing (1)
  • tests/conftest.py

📝 Walkthrough

Walkthrough

Added typing import to test configuration. Implemented a new pytest_runtest_teardown hook to safely remove the loguru logger after each test. Modified the gts_base_url fixture to return actual URL values from CLI options or defaults instead of a placeholder.

Changes

Cohort / File(s) Summary
Test Configuration Improvements
tests/conftest.py
Added typing import and introduced pytest_runtest_teardown hook to safely clean up loguru logger after each test run. Modified gts_base_url fixture to return actual URL value derived from CLI option or default instead of placeholder docstring.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Hops through the tests with glee,
Cleaning up what shouldn't be,
Logger whispers fade away,
Fresh URLs greet each test day! 🌱✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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