From 59ac2a1d2ca88594101262df6a65198e399e7da4 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 18 Nov 2021 01:45:04 -0500 Subject: [PATCH] Include test notebooks in test package Additionally, the test requires `nbconvert` to execute, and `ipykernel` as the Python 3 kernel. --- lib/matplotlib/tests/test_backend_nbagg.py | 2 ++ setupext.py | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/matplotlib/tests/test_backend_nbagg.py b/lib/matplotlib/tests/test_backend_nbagg.py index a7060ed2a7fd..4ebf3e1f56d1 100644 --- a/lib/matplotlib/tests/test_backend_nbagg.py +++ b/lib/matplotlib/tests/test_backend_nbagg.py @@ -6,6 +6,8 @@ import pytest nbformat = pytest.importorskip('nbformat') +pytest.importorskip('nbconvert') +pytest.importorskip('ipykernel') # From https://blog.thedataincubator.com/2016/06/testing-jupyter-notebooks/ diff --git a/setupext.py b/setupext.py index 9d78c719d0d0..fbd56d76eee2 100644 --- a/setupext.py +++ b/setupext.py @@ -480,6 +480,7 @@ def get_package_data(self): *_pkg_data_helper('matplotlib', 'tests/tinypages'), 'tests/cmr10.pfb', 'tests/mpltest.ttf', + 'tests/test_*.ipynb', ], 'mpl_toolkits': [ *_pkg_data_helper('mpl_toolkits', 'tests/baseline_images'),