@@ -1690,7 +1690,8 @@ def pytest_collection_finish(session):
1690
1690
# Print the Dashboard path if at least one test runs.
1691
1691
sb_config .item_count_untested = sb_config .item_count
1692
1692
dash_path = os .path .join (os .getcwd (), "dashboard.html" )
1693
- star_len = len ("Dashboard: " ) + len (dash_path )
1693
+ dash_url = "file://" + dash_path .replace ("\\ " , "/" )
1694
+ star_len = len ("Dashboard: " ) + len (dash_url )
1694
1695
try :
1695
1696
terminal_size = os .get_terminal_size ().columns
1696
1697
if terminal_size > 30 and star_len > terminal_size :
@@ -1710,10 +1711,10 @@ def pytest_collection_finish(session):
1710
1711
and session .config .workerinput ["workerid" ] == "gw0"
1711
1712
):
1712
1713
sys .stderr .write (
1713
- "\n Dashboard: %s%s%s\n %s\n " % (c1 , dash_path , cr , stars )
1714
+ "\n Dashboard: %s%s%s\n %s\n " % (c1 , dash_url , cr , stars )
1714
1715
)
1715
1716
else :
1716
- print ("Dashboard: %s%s%s\n %s" % (c1 , dash_path , cr , stars ))
1717
+ print ("Dashboard: %s%s%s\n %s" % (c1 , dash_url , cr , stars ))
1717
1718
1718
1719
1719
1720
def pytest_runtest_setup (item ):
@@ -1827,14 +1828,17 @@ def pytest_terminal_summary(terminalreporter):
1827
1828
):
1828
1829
# Print link a second time because the first one may be off-screen
1829
1830
dashboard_file = os .path .join (os .getcwd (), "dashboard.html" )
1830
- terminalreporter .write_sep ("-" , "Dashboard: %s" % dashboard_file )
1831
+ dashboard_url = "file://" + dashboard_file .replace ("\\ " , "/" )
1832
+ terminalreporter .write_sep ("-" , "Dashboard = %s" % dashboard_url )
1831
1833
if (
1832
1834
sb_config ._has_exception
1833
1835
or sb_config .save_screenshot
1834
1836
or sb_config ._has_logs
1835
1837
):
1836
1838
# Log files are generated during test failures and Screenshot Mode
1837
- terminalreporter .write_sep ("-" , "LogPath: %s" % latest_logs_dir )
1839
+ terminalreporter .write_sep (
1840
+ "-" , "Latest Logs dir: %s" % latest_logs_dir
1841
+ )
1838
1842
1839
1843
1840
1844
def _perform_pytest_unconfigure_ ():
0 commit comments