Skip to content

Commit b797f29

Browse files
committed
TST: try to fix windows by directly setting mplbackend env
1 parent d03d736 commit b797f29

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/tests/test_backend_webagg.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
@pytest.mark.parametrize('backend', ['webagg', 'nbagg'])
77
def test_webagg_fallback(backend):
8-
test_code = ("import matplotlib.pyplot as plt; " +
8+
test_code = ("import os;" +
9+
f"os.environ['MPLBACKEND'] = {backend};" +
10+
"import matplotlib.pyplot as plt; " +
911
"print(plt.get_backend());"
1012
f"assert '{backend}' == plt.get_backend().lower();")
1113
ret = subprocess.call(

0 commit comments

Comments
 (0)