Skip to content

Commit 251fe08

Browse files
authored
tests: reset root logger level in test teardown
1 parent 6bbbb8e commit 251fe08

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/cli/test_main_logging.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ def _setup(monkeypatch: pytest.MonkeyPatch, session: Streamlink):
3333
monkeypatch.setattr("streamlink_cli.main.setup_signals", Mock())
3434
monkeypatch.setattr("streamlink_cli.argparser.find_default_player", Mock())
3535

36+
level = streamlink_cli.main.logger.root.level
37+
3638
try:
3739
yield
3840
finally:
3941
streamlink_cli.main.logger.root.handlers.clear()
42+
streamlink_cli.main.logger.root.setLevel(level)
4043
streamlink_cli.main.args = None # type: ignore[assignment]
4144
streamlink_cli.main.console = None # type: ignore[assignment]
4245

0 commit comments

Comments
 (0)