Skip to content

Commit

Permalink
Pin selenium (#427)
Browse files Browse the repository at this point in the history
This should (hopefully) fix the failing HTML & PDF exporter tests in `test_reports.py`. See altair-viz/altair_saver#104 and vega/altair#2624

Closes DEV-7078
  • Loading branch information
jairideout authored Jul 27, 2022
1 parent 3f63189 commit 26ace1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"jinja2<=3.1",
"WeasyPrint==54.2",
"altair_saver==0.5.0",
"selenium<4.3.0", # see https://github.com/altair-viz/altair_saver/issues/104
]

setup(
Expand Down
5 changes: 4 additions & 1 deletion tests/test_viz.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import math
import mock
import pytest

Expand Down Expand Up @@ -93,7 +94,9 @@ def test_plot_metadata_alpha_diversity_with_nans(ocx, api_data):
with mock.patch.object(SampleCollection, "alpha_diversity", return_value=mock_alpha_div_values):
chart = samples.plot_metadata(vaxis="shannon", return_chart=True)

assert chart.data["shannon"].tolist() == [5.2120437645419395]
shannon_result = chart.data["shannon"].tolist()
assert len(shannon_result) == 1
assert math.isclose(shannon_result[0], 5.212043764541939)
assert chart.mark == "circle"


Expand Down

0 comments on commit 26ace1a

Please sign in to comment.