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

Skip to content

Commit ad0e579

Browse files
committed
TST: skip tests based on user name?
1 parent b55fdf9 commit ad0e579

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/matplotlib/tests/test_backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def test_get_default_filename(tmpdir):
5858
@pytest.mark.backend('pdf')
5959
def test_non_gui_warning():
6060
print(list(os.environ))
61-
pytest.mark.skipif('AZURE_HTTP_USER_AGENT' in os.environ)
61+
pytest.mark.skipif(os.environ.get('USER', '') == 'vsts')
6262
plt.subplots()
6363

6464
with pytest.warns(UserWarning) as rec:

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +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)
122+
pytest.mark.skipif(os.environ.get('USER', '') == 'vsts')
123123
pytest.importorskip("tornado")
124124
proc = subprocess.Popen([sys.executable, "-c", _test_script],
125125
env={**os.environ, "MPLBACKEND": "webagg"})

0 commit comments

Comments
 (0)