feat: merge geekan:main

This commit is contained in:
莘权 马 2023-12-08 19:55:47 +08:00
parent 769dc8220d
commit ec8c703c5a
14 changed files with 251 additions and 18 deletions

View file

@ -73,6 +73,17 @@ def proxy():
return "http://{}:{}".format(*server.sockets[0].getsockname())
# see https://github.com/Delgan/loguru/issues/59#issuecomment-466591978
@pytest.fixture
def loguru_caplog(caplog):
class PropogateHandler(logging.Handler):
def emit(self, record):
logging.getLogger(record.name).handle(record)
logger.add(PropogateHandler(), format="{message}")
yield caplog
# init & dispose git repo
@pytest.fixture(scope="session", autouse=True)
def setup_and_teardown_git_repo(request):