@@ -856,7 +856,7 @@ def pytest_terminal_summary(terminalreporter):
856
856
def pytest_unconfigure ():
857
857
""" This runs after all tests have completed with pytest. """
858
858
proxy_helper .remove_proxy_zip_if_present ()
859
- if sb_config .reuse_session :
859
+ if hasattr ( sb_config , 'reuse_session' ) and sb_config .reuse_session :
860
860
# Close the shared browser session
861
861
if sb_config .shared_driver :
862
862
try :
@@ -866,10 +866,13 @@ def pytest_unconfigure():
866
866
except Exception :
867
867
pass
868
868
sb_config .shared_driver = None
869
- log_helper .archive_logs_if_set (sb_config .log_path , sb_config .archive_logs )
869
+ if hasattr (sb_config , 'log_path' ):
870
+ log_helper .archive_logs_if_set (
871
+ sb_config .log_path , sb_config .archive_logs )
870
872
871
873
# Dashboard post-processing: Disable time-based refresh and stamp complete
872
- if sb_config .dashboard and not sb_config ._only_unittest :
874
+ if hasattr (sb_config , 'dashboard' ) and (
875
+ sb_config .dashboard and not sb_config ._only_unittest ):
873
876
stamp = ""
874
877
if sb_config ._dash_is_html_report :
875
878
# (If the Dashboard URL is the same as the HTML Report URL:)
@@ -985,7 +988,8 @@ def pytest_runtest_makereport(item, call):
985
988
pytest_html = item .config .pluginmanager .getplugin ('html' )
986
989
outcome = yield
987
990
report = outcome .get_result ()
988
- if pytest_html and report .when == 'call' :
991
+ if pytest_html and report .when == 'call' and (
992
+ hasattr (sb_config , 'dashboard' )):
989
993
if sb_config .dashboard and not sb_config ._sbase_detected :
990
994
test_id , display_id = _get_test_ids_ (item )
991
995
r_outcome = report .outcome
0 commit comments