77import pytest
88from config .constants import URL
99from playwright .sync_api import sync_playwright
10- from py . xml import html # type: ignore
10+
1111
1212@pytest .fixture (scope = "session" )
1313def login_logout ():
@@ -43,6 +43,7 @@ def pytest_html_report_title(report):
4343
4444log_streams = {}
4545
46+
4647@pytest .hookimpl (tryfirst = True )
4748def pytest_runtest_setup (item ):
4849 # Prepare StringIO for capturing logs
@@ -104,7 +105,7 @@ def rename_duration_column():
104105 for th in headers :
105106 if th .text .strip () == 'Duration' :
106107 th .string = 'Execution Time'
107- #print("Renamed 'Duration' to 'Execution Time'")
108+ # print("Renamed 'Duration' to 'Execution Time'")
108109 break
109110 else :
110111 print ("'Duration' column not found in report." )
@@ -118,11 +119,11 @@ def rename_duration_column():
118119
119120
120121# Add logs and docstring to report
121- @pytest .hookimpl (hookwrapper = True )
122- def pytest_runtest_makereport (item , call ):
123- outcome = yield
124- report = outcome .get_result ()
125- report .description = str (item .function .__doc__ )
126- os .makedirs ("logs" , exist_ok = True )
127- extra = getattr (report , "extra" , [])
128- report .extra = extra
122+ # @pytest.hookimpl(hookwrapper=True)
123+ # def pytest_runtest_makereport(item, call):
124+ # outcome = yield
125+ # report = outcome.get_result()
126+ # report.description = str(item.function.__doc__)
127+ # os.makedirs("logs", exist_ok=True)
128+ # extra = getattr(report, "extra", [])
129+ # report.extra = extra
0 commit comments