Skip to content

Commit 0a47b9f

Browse files
committed
minor
1 parent 6a909ee commit 0a47b9f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/e2e-playwright/tests/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import os
1212
import random
1313
import re
14+
import textwrap
1415
import urllib.parse
1516
from collections.abc import Callable, Iterator
1617
from contextlib import ExitStack
@@ -122,7 +123,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
122123

123124

124125
# Dictionary to store start times of tests
125-
_test_start_times = {}
126+
_test_start_times: dict[str, datetime.datetime] = {}
126127

127128

128129
def pytest_runtest_setup(item):
@@ -150,7 +151,7 @@ def _construct_graylog_url(
150151
return f"{monitoring_url}/graylog/search?{query}"
151152

152153

153-
def pytest_runtest_makereport(item: Item, call):
154+
def pytest_runtest_makereport(item: pytest.Item, call):
154155
"""
155156
Hook to add extra information when a test fails.
156157
"""
@@ -177,9 +178,8 @@ def pytest_runtest_makereport(item: Item, call):
177178
)
178179
diagnostics["duration"] = str(end_time - start_time)
179180

180-
# Print the diagnostics report
181-
print(f"\nDiagnostics repoort for {test_name} ---")
182-
print(json.dumps(diagnostics, indent=2))
181+
print(f"\nDiagnostics report for {test_name} ---")
182+
print(textwrap.indent(json.dumps(diagnostics, indent=2), " "))
183183
print("---")
184184

185185

0 commit comments

Comments
 (0)