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):
2160
2160
from seleniumbase .core import proxy_helper
2161
2161
2162
2162
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
2164
2169
if (
2165
2170
(hasattr (sb_config , "multi_proxy" ) and not sb_config .multi_proxy )
2166
2171
or not hasattr (sb_config , "multi_proxy" )
@@ -2497,7 +2502,11 @@ def pytest_unconfigure(config):
2497
2502
if "--co" in sys_argv or "--collect-only" in sys_argv :
2498
2503
return
2499
2504
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
+ ):
2501
2510
return
2502
2511
if hasattr (sb_config , "_multithreaded" ) and sb_config ._multithreaded :
2503
2512
import fasteners
You can’t perform that action at this time.
0 commit comments