Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 70ad7f7

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

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/tests/test_backend_webagg.py

Lines changed: 3 additions & 1 deletion
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)