Skip to content

Commit

Permalink
Try setting Agg backend for Matplotlib testing
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Mar 19, 2024
1 parent 2c00ec5 commit da1c1ed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions skimage/io/tests/test_mpl_imshow.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import numpy as np
import matplotlib
import pytest

from skimage import io
from skimage._shared._warnings import expected_warnings
from skimage._shared._dependency_checks import is_wasm

import os

plt = pytest.importorskip("matplotlib.pyplot")


def setup():
io.reset_plugins()

os.environ["MPLBACKEND"] = "agg"
matplotlib.use('Agg')


# test images. Note that they don't have their full range for their dtype,
# but we still expect the display range to equal the full dtype range.
Expand Down

0 comments on commit da1c1ed

Please sign in to comment.