File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
tests/e2e-playwright/tests Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1111import os
1212import random
1313import re
14+ import textwrap
1415import urllib .parse
1516from collections .abc import Callable , Iterator
1617from 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
128129def 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"\n Diagnostics repoort for { test_name } ---" )
182- print (json .dumps (diagnostics , indent = 2 ))
181+ print (f"\n Diagnostics report for { test_name } ---" )
182+ print (textwrap .indent (json .dumps (diagnostics , indent = 2 ), " " ))
183183 print ("---" )
184184
185185
You can’t perform that action at this time.
0 commit comments