Skip to content

Commit

Permalink
unskip dastardly tests
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 28, 2024
1 parent e8c27f4 commit 1837f0a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions bbot/core/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,25 @@ def __init__(self, core):

def cleanup_logging(self):
# Close the queue handler
self.queue_handler.close()
with suppress(Exception):
self.queue_handler.close()

# Clean root logger
root_logger = logging.getLogger()
for handler in list(root_logger.handlers):
root_logger.removeHandler(handler)
handler.close()
with suppress(Exception):
root_logger.removeHandler(handler)
with suppress(Exception):
handler.close()

# Clean all other loggers
for logger in logging.Logger.manager.loggerDict.values():
if hasattr(logger, 'handlers'): # Logger, not PlaceHolder
if hasattr(logger, "handlers"): # Logger, not PlaceHolder
for handler in list(logger.handlers):
logger.removeHandler(handler)
handler.close()
with suppress(Exception):
logger.removeHandler(handler)
with suppress(Exception):
handler.close()

# Stop queue listener
with suppress(Exception):
Expand Down
4 changes: 2 additions & 2 deletions bbot/test/test_step_2/module_tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ async def module_test(
self, httpx_mock, bbot_httpserver, bbot_httpserver_ssl, monkeypatch, request, caplog, capsys
):
# Skip dastardly test if we're in the distro tests (because dastardly uses docker)
# if os.getenv("BBOT_DISTRO_TESTS") and self.name == "dastardly":
# pytest.skip("Skipping module_test for dastardly module due to BBOT_DISTRO_TESTS environment variable")
if os.getenv("BBOT_DISTRO_TESTS") and self.name == "dastardly":
pytest.skip("Skipping module_test for dastardly module due to BBOT_DISTRO_TESTS environment variable")

self.log.info(f"Starting {self.name} module test")
module_test = self.ModuleTest(
Expand Down

0 comments on commit 1837f0a

Please sign in to comment.