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

Skip to content

Commit 37c4e9d

Browse files
authored
Merge pull request #24397 from ksunden/appveyor
Simplify appveyor to only use conda
2 parents 8d2d4c2 + 518416a commit 37c4e9d

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

.appveyor.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@ environment:
1818
PYTHONIOENCODING: UTF-8
1919
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
2020
--cov-report= --cov=lib --log-level=DEBUG
21-
PINNEDVERS: "pyzmq!=21.0.0,!=22.0.0"
2221

2322
matrix:
2423
- PYTHON_VERSION: "3.8"
2524
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
2625
TEST_ALL: "no"
27-
EXTRAREQS: "-r requirements/testing/extra.txt"
2826
- PYTHON_VERSION: "3.9"
2927
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
3028
TEST_ALL: "no"
31-
EXTRAREQS: "-r requirements/testing/extra.txt"
3229

3330
# We always use a 64-bit machine, but can build x86 distributions
3431
# with the PYTHON_ARCH variable
@@ -52,19 +49,13 @@ install:
5249
- conda config --prepend channels conda-forge
5350

5451
# For building, use a new environment
55-
- conda create -q -n test-environment python=%PYTHON_VERSION% tk "pip<22.0"
56-
- activate test-environment
57-
# pull pywin32 from conda because on py38 there is something wrong with finding
58-
# the dlls when installed from pip
52+
# Add python version to environment
53+
# `^ ` escapes spaces for indentation
54+
- echo ^ ^ - python=%PYTHON_VERSION% >> environment.yml
55+
- conda env create -f environment.yml
56+
- activate mpl-dev
5957
- conda install -c conda-forge pywin32
60-
# install pyqt from conda-forge
61-
- conda install -c conda-forge pyqt
6258
- echo %PYTHON_VERSION% %TARGET_ARCH%
63-
# Install dependencies from PyPI.
64-
- python -m pip install --upgrade -r requirements/testing/all.txt %EXTRAREQS% %PINNEDVERS%
65-
# Install optional dependencies from PyPI.
66-
# Sphinx is needed to run sphinxext tests
67-
- python -m pip install --upgrade sphinx
6859
# Show the installed packages + versions
6960
- conda list
7061

@@ -104,7 +95,7 @@ artifacts:
10495
type: zip
10596

10697
on_finish:
107-
- pip install codecov
98+
- conda install codecov
10899
- codecov -e PYTHON_VERSION PLATFORM
109100

110101
on_failure:

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies:
4444
- coverage
4545
- flake8>=3.8
4646
- flake8-docstrings>=1.4.0
47-
- gtk3
47+
- gtk4
4848
- ipykernel
4949
- nbconvert[execute]!=6.0.0,!=6.0.1
5050
- nbformat!=5.0.0,!=5.0.1

lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ def test_interactive_backend(env, toolbar):
166166
if env["MPLBACKEND"] == "macosx":
167167
if toolbar == "toolmanager":
168168
pytest.skip("toolmanager is not implemented for macosx.")
169+
if env["MPLBACKEND"] == "wx":
170+
pytest.skip("wx backend is deprecated; tests failed on appveyor")
169171
proc = _run_helper(_test_interactive_impl,
170172
json.dumps({"toolbar": toolbar}),
171173
timeout=_test_timeout,
@@ -560,6 +562,8 @@ def _test_figure_leak():
560562

561563

562564
# TODO: "0.1" memory threshold could be reduced 10x by fixing tkagg
565+
@pytest.mark.skipif(sys.platform == "win32",
566+
reason="appveyor tests fail; gh-22988 suggests reworking")
563567
@pytest.mark.parametrize("env", _get_testable_interactive_backends())
564568
@pytest.mark.parametrize("time_mem", [(0.0, 2_000_000), (0.1, 30_000_000)])
565569
def test_figure_leak_20490(env, time_mem):
@@ -568,6 +572,9 @@ def test_figure_leak_20490(env, time_mem):
568572
# We haven't yet directly identified the leaks so test with a memory growth
569573
# threshold.
570574
pause_time, acceptable_memory_leakage = time_mem
575+
if env["MPLBACKEND"] == "wx":
576+
pytest.skip("wx backend is deprecated; tests failed on appveyor")
577+
571578
if env["MPLBACKEND"] == "macosx" or (
572579
env["MPLBACKEND"] == "tkagg" and sys.platform == 'darwin'
573580
):

lib/matplotlib/tests/test_font_manager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ def test_otf():
7373
assert res == is_opentype_cff_font(f.fname)
7474

7575

76-
@pytest.mark.skipif(not has_fclist, reason='no fontconfig installed')
76+
@pytest.mark.skipif(sys.platform == "win32" or not has_fclist,
77+
reason='no fontconfig installed')
7778
def test_get_fontconfig_fonts():
7879
assert len(_get_fontconfig_fonts()) > 1
7980

lib/matplotlib/tests/test_getattr.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,16 @@
44
import matplotlib
55
import pytest
66

7-
# Get the names of all matplotlib submodules, except for the unit tests.
8-
module_names = [m.name for m in walk_packages(path=matplotlib.__path__,
9-
prefix=f'{matplotlib.__name__}.')
10-
if not m.name.startswith(__package__)]
7+
# Get the names of all matplotlib submodules,
8+
# except for the unit tests and private modules.
9+
module_names = [
10+
m.name
11+
for m in walk_packages(
12+
path=matplotlib.__path__, prefix=f'{matplotlib.__name__}.'
13+
)
14+
if not m.name.startswith(__package__)
15+
and not any(x.startswith('_') for x in m.name.split('.'))
16+
]
1117

1218

1319
@pytest.mark.parametrize('module_name', module_names)

0 commit comments

Comments
 (0)