From d348d9611d4fe6678d1b74faf61fcab49b0ac350 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 28 Oct 2024 16:44:36 -0400 Subject: [PATCH] silence live logging --- bbot/test/conftest.py | 7 +++++++ bbot/test/test_step_1/test_events.py | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bbot/test/conftest.py b/bbot/test/conftest.py index 516c0fec2..7759a4964 100644 --- a/bbot/test/conftest.py +++ b/bbot/test/conftest.py @@ -47,6 +47,13 @@ def assert_all_responses_were_requested() -> bool: return False +@pytest.fixture(autouse=True) +def silence_live_logging(): + for handler in logging.getLogger().handlers: + if type(handler).__name__ == '_LiveLoggingStreamHandler': + handler.setLevel(logging.CRITICAL) + + @pytest.fixture def bbot_httpserver(): server = HTTPServer(host="127.0.0.1", port=8888, threaded=True) diff --git a/bbot/test/test_step_1/test_events.py b/bbot/test/test_step_1/test_events.py index 97601a1e2..00ce75ff8 100644 --- a/bbot/test/test_step_1/test_events.py +++ b/bbot/test/test_step_1/test_events.py @@ -925,9 +925,3 @@ def test_event_closest_host(): vuln = scan.make_event( {"path": "/tmp/asdf.txt", "description": "test", "severity": "HIGH"}, "VULNERABILITY", parent=event3 ) - - -def test_test_output(): - import traceback - - assert False, traceback.format_stack()