Skip to content

Commit

Permalink
Fix: Import logger module correctly
Browse files Browse the repository at this point in the history
Moves the import statement for `utils.logger.init` from the top level to the `if __name__ == "__main__":` block, ensuring the logger is correctly initialized when running tests. This addresses an issue where the logger wasn't being properly configured.
  • Loading branch information
RedAtman committed Aug 3, 2024
1 parent f5e91e6 commit a104a88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/lock/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
# TODO: ResultProcess unable to collect results yet


from importlib import import_module
import logging
from multiprocessing import Process
from threading import Thread
from typing import Callable


import_module("utils.logger.init")
logger = logging.getLogger()


Expand Down Expand Up @@ -177,5 +175,7 @@ def run_tests():


if __name__ == "__main__":
from importlib import import_module

import_module("utils.logger.init")
run_tests()

0 comments on commit a104a88

Please sign in to comment.