Skip to content

Commit

Permalink
test: Update test_plot_results_no_axis baseline image (#2009)
Browse files Browse the repository at this point in the history
* matplotlib v3.6.0 results in a slightly different baseline image than
  matplotlib v3.5.x, so regenerate the baseline image using matplotlib v3.6.0
  with `pytest --mpl-generate-path=tests/contrib/baseline tests/contrib/test_viz.py`.
* Mark the test_plot_results_no_axis test as xfail for Python 3.7 as matplotlib v3.6.0
  is Python 3.8+ and so the image is guaranteed to be different as Python 3.7 runtimes
  will install matplotlib v3.5.x.
  • Loading branch information
matthewfeickert authored Sep 16, 2022
1 parent ed03d91 commit 776e859
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Binary file modified tests/contrib/baseline/test_plot_results_no_axis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions tests/contrib/test_viz.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json
import sys

import matplotlib
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -67,6 +68,10 @@ def test_plot_results(datadir):


@pytest.mark.mpl_image_compare
@pytest.mark.xfail(
sys.version_info < (3, 8),
reason="baseline image generated with matplotlib v3.6.0 which is Python 3.8+",
)
def test_plot_results_no_axis(datadir):
data = json.load(datadir.joinpath("hypotest_results.json").open(encoding="utf-8"))

Expand Down

0 comments on commit 776e859

Please sign in to comment.