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

Skip to content

Commit 1eacd31

Browse files
authored
Fix env override in WebAgg backend test. (#15737)
Fix env override in WebAgg backend test.
2 parents 70fb1a6 + f0dbd8d commit 1eacd31

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/matplotlib/tests/test_backend_webagg.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
def test_webagg_fallback(backend):
99
if backend == "nbagg":
1010
pytest.importorskip("IPython")
11-
env = {}
12-
if os.name == "nt":
13-
env = dict(os.environ)
14-
else:
15-
env = {"DISPLAY": ""}
11+
env = dict(os.environ)
12+
if os.name != "nt":
13+
env["DISPLAY"] = ""
1614

1715
env["MPLBACKEND"] = backend
1816

0 commit comments

Comments
 (0)