Skip to content

Commit

Permalink
Update test_vis.py (#315)
Browse files Browse the repository at this point in the history
Issue when running test_vis in Github Actions. Adjusted test_scatter_chart and test_colored_scatter_chart
  • Loading branch information
thyneb19 committed Mar 20, 2021
1 parent 182a4b7 commit 127806f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/test_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,11 @@ def test_scatter_chart(global_var):
vis = Vis(["Acceleration", "Weight"], df)
vis_code = vis.to_matplotlib_code()
assert "ax.scatter(x_pts, y_pts, alpha=0.5)" in vis_code
assert "ax.set_xlabel('Acceleration')" in vis_code
assert "ax.set_ylabel('Weight')" in vis_code
assert (
"ax.set_xlabel('Acceleration', fontsize='15')" in vis_code
or "ax.set_xlabel('Acceleration')" in vis_code
)
assert "ax.set_ylabel('Weight', fontsize='15')" in vis_code or "ax.set_ylabel('Weight')" in vis_code


def test_colored_scatter_chart(global_var):
Expand All @@ -290,8 +293,11 @@ def test_colored_scatter_chart(global_var):
vis_code = vis.to_matplotlib_code()
assert "ax.scatter" in vis_code
assert "title='Origin'" in vis_code
assert "ax.set_xlabel('Acceleration')" in vis_code
assert "ax.set_ylabel('Weight')" in vis_code
assert (
"ax.set_xlabel('Acceleration', fontsize='15')" in vis_code
or "ax.set_xlabel('Acceleration')" in vis_code
)
assert "ax.set_ylabel('Weight', fontsize='15')" in vis_code or "ax.set_ylabel('Weight')" in vis_code


def test_line_chart(global_var):
Expand Down

0 comments on commit 127806f

Please sign in to comment.