also show the chatmail instance prominently in the test header

This commit is contained in:
holger krekel
2023-10-16 17:09:45 +02:00
parent fdb01d269c
commit bb567b4fb7

View File

@@ -28,6 +28,14 @@ def maildomain():
pytest.skip("set CHATMAIL_DOMAIN to a ssh-reachable chatmail instance")
return domain
def pytest_report_header():
domain = os.environ.get("CHATMAIL_DOMAIN")
if domain:
text = f"chatmail test instance: {domain}"
return ["-" * len(text), text, "-" * len(text)]
@pytest.fixture
def imap(maildomain):
return ImapConn(maildomain)