text: import logging
  
  import pytest
  
  from mergify_engine import utils
  
  
  @pytest.fixture()
  def logger_checker(request, caplog):
      # daiquiri removes all handlers during setup, as we want to sexy output and the pytest
      # capability at the same, we must add back the pytest handler
      utils.setup_logging()
      logging.getLogger(None).addHandler(caplog.handler)
      yield
      for when in ("setup", "call", "teardown"):
          assert [] == [
              rec.message
              for rec in caplog.get_records(when)
              if rec.levelname in ("CRITICAL", "ERROR")
          ]
  