File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2160,7 +2160,12 @@ def _perform_pytest_unconfigure_(config):
21602160 from seleniumbase .core import proxy_helper
21612161
21622162 reporter = config .pluginmanager .get_plugin ("terminalreporter" )
2163- duration = time .time () - reporter ._sessionstarttime
2163+ start_time = None
2164+ if hasattr (reporter , "_sessionstarttime" ):
2165+ start_time = reporter ._sessionstarttime # (pytest < 8.4.0)
2166+ else :
2167+ start_time = reporter ._session_start .time # (pytest >= 8.4.0)
2168+ duration = time .time () - start_time
21642169 if (
21652170 (hasattr (sb_config , "multi_proxy" ) and not sb_config .multi_proxy )
21662171 or not hasattr (sb_config , "multi_proxy" )
@@ -2497,7 +2502,11 @@ def pytest_unconfigure(config):
24972502 if "--co" in sys_argv or "--collect-only" in sys_argv :
24982503 return
24992504 reporter = config .pluginmanager .get_plugin ("terminalreporter" )
2500- if not hasattr (reporter , "_sessionstarttime" ):
2505+ if (
2506+ not hasattr (reporter , "_sessionstarttime" )
2507+ and not hasattr (reporter , "_session_start" )
2508+ and not hasattr (reporter ._session_start , "time" )
2509+ ):
25012510 return
25022511 if hasattr (sb_config , "_multithreaded" ) and sb_config ._multithreaded :
25032512 import fasteners
You can’t perform that action at this time.
0 commit comments