forked from valkey-io/valkey-glide
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
18 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from pybushka.logger import Level, Logger | ||
from tests.conftest import DEFAULT_TEST_LOG_LEVEL | ||
|
||
|
||
class TestLogger: | ||
def test_init_logger(self): | ||
# The logger is already configured in the conftest file, so calling init again shouldn't modify the log level | ||
Logger.init(Level.DEBUG) | ||
assert Logger.logger_level != Level.DEBUG.value | ||
|
||
def test_set_logger_config(self): | ||
Logger.set_logger_config(Level.INFO) | ||
assert Logger.logger_level == Level.INFO.value | ||
# Revert to the tests default log level | ||
Logger.set_logger_config(DEFAULT_TEST_LOG_LEVEL) | ||
assert Logger.logger_level == DEFAULT_TEST_LOG_LEVEL.value |