FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Backport PR #24397 on branch v3.6.x (Simplify appveyor to only use conda) by meeseeksmachine · Pull Request #24616 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (3) .yml  (2) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
21 changes: 6 additions & 15 deletions .appveyor.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ environment:
PYTHONIOENCODING: UTF-8
PYTEST_ARGS: -raR --numprocesses=auto --timeout=300 --durations=25
--cov-report= --cov=lib --log-level=DEBUG
PINNEDVERS: "pyzmq!=21.0.0,!=22.0.0"

matrix:
- PYTHON_VERSION: "3.8"
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
TEST_ALL: "no"
EXTRAREQS: "-r requirements/testing/extra.txt"
- PYTHON_VERSION: "3.9"
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
TEST_ALL: "no"
EXTRAREQS: "-r requirements/testing/extra.txt"

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

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

Expand Down Expand Up @@ -104,7 +95,7 @@ artifacts:
type: zip

on_finish:
- pip install codecov
- conda install codecov
- codecov -e PYTHON_VERSION PLATFORM

on_failure:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies:
- coverage
- flake8>=3.8
- flake8-docstrings>=1.4.0
- gtk3
- gtk4
- ipykernel
- nbconvert[execute]!=6.0.0,!=6.0.1
- nbformat!=5.0.0,!=5.0.1
Expand Down
7 changes: 7 additions & 0 deletions lib/matplotlib/tests/test_backends_interactive.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ def test_interactive_backend(env, toolbar):
if env["MPLBACKEND"] == "macosx":
if toolbar == "toolmanager":
pytest.skip("toolmanager is not implemented for macosx.")
if env["MPLBACKEND"] == "wx":
pytest.skip("wx backend is deprecated; tests failed on appveyor")
proc = _run_helper(_test_interactive_impl,
json.dumps({"toolbar": toolbar}),
timeout=_test_timeout,
Expand Down Expand Up @@ -560,6 +562,8 @@ def _test_figure_leak():


# TODO: "0.1" memory threshold could be reduced 10x by fixing tkagg
@pytest.mark.skipif(sys.platform == "win32",
reason="appveyor tests fail; gh-22988 suggests reworking")
@pytest.mark.parametrize("env", _get_testable_interactive_backends())
@pytest.mark.parametrize("time_mem", [(0.0, 2_000_000), (0.1, 30_000_000)])
def test_figure_leak_20490(env, time_mem):
Expand All @@ -568,6 +572,9 @@ def test_figure_leak_20490(env, time_mem):
# We haven't yet directly identified the leaks so test with a memory growth
# threshold.
pause_time, acceptable_memory_leakage = time_mem
if env["MPLBACKEND"] == "wx":
pytest.skip("wx backend is deprecated; tests failed on appveyor")

if env["MPLBACKEND"] == "macosx" or (
env["MPLBACKEND"] == "tkagg" and sys.platform == 'darwin'
):
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_font_manager.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ def test_otf():
assert res == is_opentype_cff_font(f.fname)


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

Expand Down
14 changes: 10 additions & 4 deletions lib/matplotlib/tests/test_getattr.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
import matplotlib
import pytest

# Get the names of all matplotlib submodules, except for the unit tests.
module_names = [m.name for m in walk_packages(path=matplotlib.__path__,
prefix=f'{matplotlib.__name__}.')
if not m.name.startswith(__package__)]
# Get the names of all matplotlib submodules,
# except for the unit tests and private modules.
module_names = [
m.name
for m in walk_packages(
path=matplotlib.__path__, prefix=f'{matplotlib.__name__}.'
)
if not m.name.startswith(__package__)
and not any(x.startswith('_') for x in m.name.split('.'))
]


@pytest.mark.parametrize('module_name', module_names)
Expand Down

Back | FazBrowse Home | New Git URL