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

Skip to content

Commit ba46ce4

Browse files
committed
TST: skip some tests on azure
1 parent 11ac939 commit ba46ce4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lib/matplotlib/tests/test_backend_bases.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import matplotlib.pyplot as plt
44
import matplotlib.transforms as transforms
55
import matplotlib.path as path
6-
6+
import os
77
import numpy as np
88
import pytest
99

@@ -57,9 +57,9 @@ def test_get_default_filename(tmpdir):
5757

5858
@pytest.mark.backend('pdf')
5959
def test_non_gui_warning():
60-
plt.close('all')
60+
pytest.mark.skipif('AZURE_HTTP_USER_AGENT' in os.environ)
6161
plt.subplots()
62-
print(matplotlib.get_backend())
62+
6363
with pytest.warns(UserWarning) as rec:
6464
plt.show()
6565
assert len(rec) == 1

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def test_interactive_backend(backend):
119119

120120
@pytest.mark.skipif(os.name == "nt", reason="Cannot send SIGINT on Windows.")
121121
def test_webagg():
122+
pytest.mark.skipif('AZURE_HTTP_USER_AGENT' in os.environ)
122123
pytest.importorskip("tornado")
123124
proc = subprocess.Popen([sys.executable, "-c", _test_script],
124125
env={**os.environ, "MPLBACKEND": "webagg"})

0 commit comments

Comments
 (0)