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

Skip to content

Commit 84f02fe

Browse files
authored
Merge pull request #12726 from anntzer/test_non_gui_warning
FIX: test_non_gui_warning for Azure (and mplcairo).
2 parents 3bf9076 + f1bc933 commit 84f02fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/tests/test_backend_bases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ def test_get_default_filename(tmpdir):
5858

5959

6060
@pytest.mark.backend('pdf')
61-
@pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ,
62-
reason="this test fails an azure for unknown reasons")
63-
def test_non_gui_warning():
61+
def test_non_gui_warning(monkeypatch):
6462
plt.subplots()
6563

64+
monkeypatch.setitem(os.environ, "DISPLAY", ":999")
65+
6666
with pytest.warns(UserWarning) as rec:
6767
plt.show()
6868
assert len(rec) == 1

0 commit comments

Comments
 (0)