1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-31 23:59:38 +03:00

Lint new EDMCLogging test

This commit is contained in:
Athanasius 2021-05-10 15:34:49 +01:00
parent 4db6542269
commit bf54af7211

View File

@ -1,3 +1,4 @@
"""Test that logging works correctly from a class-definition caller."""
import sys
sys.path += "../" # Dont ask me why for this one it breaks, it just does.
@ -15,17 +16,17 @@ class ClassVarLogger:
"""Test class with logger attached."""
@classmethod
def set_logger(cls, logger):
def set_logger(cls, logger) -> None:
"""Set the passed logger onto the _class_."""
ClassVarLogger.logger = logger
ClassVarLogger.logger = logger # type: ignore
def log_stuff(msg: str):
"""Wrapper logger func."""
def log_stuff(msg: str) -> None:
"""Wrap logging in another function."""
ClassVarLogger.logger.debug(msg) # type: ignore # its there
def test_class_logger(caplog: 'LogCaptureFixture'):
def test_class_logger(caplog: 'LogCaptureFixture') -> None:
"""
Test that logging from a class variable doesn't explode.