Skip to content

Commit 0f2d3f2

Browse files
committed
test: Update tests to use rich Handler
1 parent 3ed1454 commit 0f2d3f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_log_setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from freqtrade.exceptions import OperationalException
77
from freqtrade.loggers import (
88
FTBufferingHandler,
9-
FTStdErrStreamHandler,
9+
FtRichHandler,
1010
set_loggers,
1111
setup_logging,
1212
setup_logging_pre,
@@ -72,7 +72,7 @@ def test_set_loggers_syslog():
7272
setup_logging(config)
7373
assert len(logger.handlers) == 3
7474
assert [x for x in logger.handlers if isinstance(x, logging.handlers.SysLogHandler)]
75-
assert [x for x in logger.handlers if isinstance(x, FTStdErrStreamHandler)]
75+
assert [x for x in logger.handlers if isinstance(x, FtRichHandler)]
7676
assert [x for x in logger.handlers if isinstance(x, FTBufferingHandler)]
7777
# setting up logging again should NOT cause the loggers to be added a second time.
7878
setup_logging(config)
@@ -96,7 +96,7 @@ def test_set_loggers_Filehandler(tmp_path):
9696
setup_logging(config)
9797
assert len(logger.handlers) == 3
9898
assert [x for x in logger.handlers if isinstance(x, logging.handlers.RotatingFileHandler)]
99-
assert [x for x in logger.handlers if isinstance(x, FTStdErrStreamHandler)]
99+
assert [x for x in logger.handlers if isinstance(x, FtRichHandler)]
100100
assert [x for x in logger.handlers if isinstance(x, FTBufferingHandler)]
101101
# setting up logging again should NOT cause the loggers to be added a second time.
102102
setup_logging(config)
@@ -145,7 +145,7 @@ def test_set_loggers_journald(mocker):
145145
setup_logging(config)
146146
assert len(logger.handlers) == 3
147147
assert [x for x in logger.handlers if type(x).__name__ == "JournaldLogHandler"]
148-
assert [x for x in logger.handlers if isinstance(x, FTStdErrStreamHandler)]
148+
assert [x for x in logger.handlers if isinstance(x, FtRichHandler)]
149149
# reset handlers to not break pytest
150150
logger.handlers = orig_handlers
151151

0 commit comments

Comments
 (0)