Skip to content

Commit 5597d71

Browse files
authored
Merge pull request #831 from seleniumbase/fix-pytest-html-reports
Fix the dashboard pie chart on pytest html reports for path changes
2 parents 7fb3585 + c118c56 commit 5597d71

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

requirements.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ PyYAML>=5.4.1;python_version>="3.6"
1111
certifi>=2020.12.5
1212
six==1.15.0
1313
nose==1.3.7
14-
ipdb==0.13.4
14+
ipdb==0.13.4;python_version<"3.6"
15+
ipdb==0.13.5;python_version>="3.6"
1516
parso==0.7.1;python_version<"3.6"
1617
parso==0.8.1;python_version>="3.6"
1718
jedi==0.17.2;python_version<"3.6"
@@ -77,15 +78,15 @@ cffi==1.14.5
7778
toml==0.10.2
7879
Pillow==6.2.2;python_version<"3.5"
7980
Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"
80-
Pillow==8.1.0;python_version>="3.6"
81-
rich==9.12.3;python_version>="3.6" and python_version<"4.0"
81+
Pillow==8.1.1;python_version>="3.6"
82+
rich==9.12.4;python_version>="3.6" and python_version<"4.0"
8283
flake8==3.7.9;python_version<"3.5"
8384
flake8==3.8.4;python_version>="3.5"
8485
pyflakes==2.1.1;python_version<"3.5"
8586
pyflakes==2.2.0;python_version>="3.5"
8687
tornado==5.1.1;python_version<"3.5"
8788
tornado==6.1;python_version>="3.5"
8889
allure-pytest==2.8.22;python_version<"3.5"
89-
allure-pytest==2.8.34;python_version>="3.5"
90+
allure-pytest==2.8.35;python_version>="3.5"
9091
pdfminer.six==20191110;python_version<"3.5"
9192
pdfminer.six==20201018;python_version>="3.5"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "1.56.3"
2+
__version__ = "1.56.4"

seleniumbase/plugins/pytest_plugin.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,8 +935,13 @@ def pytest_unconfigure():
935935
with open(html_report_path, 'r', encoding='utf-8') as f:
936936
the_html_r = f.read()
937937
if sb_config._saved_dashboard_pie:
938+
h_r_name = sb_config._html_report_name
939+
if "/" in h_r_name and h_r_name.endswith(".html"):
940+
h_r_name = h_r_name.split('/')[-1]
941+
elif "\\" in h_r_name and h_r_name.endswith(".html"):
942+
h_r_name = h_r_name.split('\\')[-1]
938943
the_html_r = the_html_r.replace(
939-
"<h1>%s</h1>" % sb_config._html_report_name,
944+
"<h1>%s</h1>" % h_r_name,
940945
sb_config._saved_dashboard_pie)
941946
the_html_r = the_html_r.replace(
942947
"</head>", '</head><link rel="shortcut icon" '

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@
115115
'certifi>=2020.12.5',
116116
'six==1.15.0',
117117
'nose==1.3.7',
118-
'ipdb==0.13.4',
118+
'ipdb==0.13.4;python_version<"3.6"',
119+
'ipdb==0.13.5;python_version>="3.6"',
119120
'parso==0.7.1;python_version<"3.6"',
120121
'parso==0.8.1;python_version>="3.6"',
121122
'jedi==0.17.2;python_version<"3.6"',
@@ -181,16 +182,16 @@
181182
'toml==0.10.2',
182183
'Pillow==6.2.2;python_version<"3.5"',
183184
'Pillow==7.2.0;python_version>="3.5" and python_version<"3.6"',
184-
'Pillow==8.1.0;python_version>="3.6"',
185-
'rich==9.12.3;python_version>="3.6" and python_version<"4.0"',
185+
'Pillow==8.1.1;python_version>="3.6"',
186+
'rich==9.12.4;python_version>="3.6" and python_version<"4.0"',
186187
'flake8==3.7.9;python_version<"3.5"',
187188
'flake8==3.8.4;python_version>="3.5"',
188189
'pyflakes==2.1.1;python_version<"3.5"',
189190
'pyflakes==2.2.0;python_version>="3.5"',
190191
'tornado==5.1.1;python_version<"3.5"',
191192
'tornado==6.1;python_version>="3.5"',
192193
'allure-pytest==2.8.22;python_version<"3.5"',
193-
'allure-pytest==2.8.34;python_version>="3.5"',
194+
'allure-pytest==2.8.35;python_version>="3.5"',
194195
'pdfminer.six==20191110;python_version<"3.5"',
195196
'pdfminer.six==20201018;python_version>="3.5"',
196197
],

0 commit comments

Comments
 (0)