Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d7af82c

Browse filesBrowse files
authored
Merge pull request #12723 from meeseeksmachine/auto-backport-of-pr-12617-on-v3.0.x
Backport PR #12617 on branch v3.0.x (Set up CI with Azure Pipelines)
2 parents a360c08 + 047f8f6 commit d7af82c
Copy full SHA for d7af82c

File tree

Expand file treeCollapse file tree

4 files changed

+66
-2
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+66
-2
lines changed

‎azure-pipelines.yml

Copy file name to clipboard
+53Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Python package
2+
# Create and test a Python package on multiple Python versions.
3+
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
5+
6+
jobs:
7+
8+
- job: 'Test'
9+
pool:
10+
vmImage: 'Ubuntu 16.04'
11+
strategy:
12+
matrix:
13+
Python35:
14+
python.version: '3.5'
15+
Python36:
16+
python.version: '3.6'
17+
Python37:
18+
python.version: '3.7'
19+
maxParallel: 4
20+
21+
steps:
22+
- task: UsePythonVersion@0
23+
inputs:
24+
versionSpec: '$(python.version)'
25+
architecture: 'x64'
26+
27+
- script: |
28+
29+
python -m pip install --upgrade pip
30+
pip install -r requirements/testing/travis_all.txt -r requirements/testing/travis36.txt
31+
32+
displayName: 'Install dependencies'
33+
34+
- script: |
35+
36+
export MPLLOCALFREETYPE=1
37+
pip install -ve .
38+
39+
displayName: "Install self"
40+
41+
- script: env
42+
displayName: 'print env'
43+
44+
- script: |
45+
env
46+
pytest --junitxml=junit/test-results.xml -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n 2
47+
displayName: 'pytest'
48+
49+
- task: PublishTestResults@2
50+
inputs:
51+
testResultsFiles: '**/test-results.xml'
52+
testRunTitle: 'Python $(python.version)'
53+
condition: succeededOrFailed()

‎lib/matplotlib/tests/test_backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_bases.py
+4-1Lines changed: 4 additions & 1 deletion
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

@@ -56,8 +56,11 @@ def test_get_default_filename(tmpdir):
5656

5757

5858
@pytest.mark.backend('pdf')
59+
@pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ,
60+
reason="this test fails an azure for unknown reasons")
5961
def test_non_gui_warning():
6062
plt.subplots()
63+
6164
with pytest.warns(UserWarning) as rec:
6265
plt.show()
6366
assert len(rec) == 1

‎lib/matplotlib/tests/test_backend_nbagg.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backend_nbagg.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ def _notebook_run(nb_file):
1313
"""Execute a notebook via nbconvert and collect output.
1414
:returns (parsed nb object, execution errors)
1515
"""
16-
with tempfile.NamedTemporaryFile(suffix=".ipynb") as fout:
16+
with tempfile.NamedTemporaryFile(suffix=".ipynb",
17+
mode='w+t') as fout:
1718
args = ["jupyter", "nbconvert", "--to", "notebook", "--execute",
1819
"--ExecutePreprocessor.timeout=500",
1920
"--output", fout.name, nb_file]

‎lib/matplotlib/tests/test_backends_interactive.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_backends_interactive.py
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import importlib
2+
import importlib.util
23
import os
34
import signal
45
import subprocess
@@ -46,6 +47,7 @@ def _get_testable_interactive_backends():
4647
# we directly invoke it from the superclass instead.
4748
_test_script = """\
4849
import importlib
50+
import importlib.util
4951
import sys
5052
from unittest import TestCase
5153
@@ -115,6 +117,8 @@ def test_interactive_backend(backend):
115117
pytest.fail("The subprocess returned an error.")
116118

117119

120+
@pytest.mark.skipif('SYSTEM_TEAMFOUNDATIONCOLLECTIONURI' in os.environ,
121+
reason="this test fails an azure for unknown reasons")
118122
@pytest.mark.skipif(os.name == "nt", reason="Cannot send SIGINT on Windows.")
119123
def test_webagg():
120124
pytest.importorskip("tornado")
@@ -125,6 +129,9 @@ def test_webagg():
125129
timeout = time.perf_counter() + _test_timeout
126130
while True:
127131
try:
132+
retcode = proc.poll()
133+
# check that the subprocess for the server is not dead
134+
assert retcode is None
128135
conn = urllib.request.urlopen(url)
129136
break
130137
except urllib.error.URLError:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.