Rotary Logger  1.0.2
The middleware rotary logger
Loading...
Searching...
No Matches
tests.conftest Namespace Reference

Functions

 restore_streams ()
 

Detailed Description

Pytest configuration and shared fixtures for rotary_logger tests.

Function Documentation

◆ restore_streams()

tests.conftest.restore_streams ( )
Restore sys.stdout/stderr before and after each test for proper isolation.

When running with pytest -s (no capture), this fixture ensures that if any
test leaves sys.stdout or sys.stderr as TeeStream instances (indicating
cleanup failed), those streams are restored before the next test runs.
This prevents test isolation failures that are hidden when using pytest -q
(which has its own capture mechanism that resets streams).

Definition at line 12 of file conftest.py.