diff --git a/README.md b/README.md index 439fe33..1df2d2a 100644 --- a/README.md +++ b/README.md @@ -63,12 +63,11 @@ Please note, DIY Hotspots do not earn HNT. | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Pi Supply IoT LoRa Gateway HAT | RPi | DIY-PISLGH | 0.0 | 22 | | | Light | False | Any pi with 40 pin header | | RAK2287 | RPi | DIY-RAK2287 | 0.0 | 17 | | | Light | False | Any pi with 40 pin header | -## utils -### logger +## logger ```python -from hm_pyhelper.utils import logger +from hm_pyhelper.logger import get_logger logger = get_logger(__name__) logger.debug("message to log") ``` diff --git a/hm_pyhelper/utils/logger.py b/hm_pyhelper/logger.py similarity index 100% rename from hm_pyhelper/utils/logger.py rename to hm_pyhelper/logger.py diff --git a/hm_pyhelper/tests/utils/test_logger.py b/hm_pyhelper/tests/test_logger.py similarity index 78% rename from hm_pyhelper/tests/utils/test_logger.py rename to hm_pyhelper/tests/test_logger.py index a43d518..86acb27 100644 --- a/hm_pyhelper/tests/utils/test_logger.py +++ b/hm_pyhelper/tests/test_logger.py @@ -1,11 +1,11 @@ from unittest import TestCase -from hm_pyhelper.utils.logger import get_logger, _log_format +from hm_pyhelper.logger import get_logger, _log_format import re import logging -class TestExample(TestCase): - def test_logging(self): +class TestLogger(TestCase): + def test_get_logger(self): logger = get_logger(__name__) with self.assertLogs() as captured: @@ -20,7 +20,8 @@ def test_logging(self): # Do not check timestamp and filepath because those change # based on the environment and run time expected_partial_output_regex = re.escape( - " - [DEBUG] - test_logger - (test_logger.py).test_logging -- ") + " - [DEBUG] - hm_pyhelper.tests.test_logger -" + + " (test_logger.py).test_get_logger -- ") expected_output_regex = ".*" + \ expected_partial_output_regex + ".*" + \ " - Hello world." diff --git a/setup.py b/setup.py index 365f67b..c6e8e94 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name='hm_pyhelper', - version='0.8', + version='0.10', author="Nebra Ltd", author_email="support@nebra.com", description="Helium Python Helper",