test(logging): fix null formatter pyright error in setup test
Replace check with assertion to satisfy pyright's handler-type compatibility check.
This commit is contained in:
@@ -30,9 +30,11 @@ class TestConfigureLogging:
|
||||
assert len(root.handlers) == 1
|
||||
handler = root.handlers[0]
|
||||
formatter = handler.formatter
|
||||
assert "%(name)s" in formatter._fmt
|
||||
assert "%(levelname)s" in formatter._fmt
|
||||
assert "%(asctime)s" in formatter._fmt
|
||||
assert formatter is not None
|
||||
fmt = formatter._fmt or ""
|
||||
assert "%(name)s" in fmt
|
||||
assert "%(levelname)s" in fmt
|
||||
assert "%(asctime)s" in fmt
|
||||
|
||||
def test_idempotent_second_call(self):
|
||||
self._clear_handlers()
|
||||
|
||||
Reference in New Issue
Block a user