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 dcc2a8d

Browse filesBrowse files
committed
Split toolkit tests into their toolkits
Conceptually, every subdirectory of `mpl_toolkits` is an independent thing (mostly, though `axisartist` does use parts of `axes_grid1`). It is thus strange for all the tests to be stuck together in a single `tests` directory. Additionally, this causes naming oddities such as using parts of file names as a pseudo-namespace (i.e., `test_axisartist_*`) when we already have a namespace, namely the directory that is the toolkit. As we add additional tests for the toolkits (mostly 3D, I mean), this will either cause the number of these oddities to grow, or else `test_mplot3d.py` will just become an extremely large file.
1 parent cd185ab commit dcc2a8d
Copy full SHA for dcc2a8d

File tree

Expand file treeCollapse file tree

100 files changed

+30
-1
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

100 files changed

+30
-1
lines changed
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from pathlib import Path
2+
3+
4+
# Check that the test directories exist
5+
if not (Path(__file__).parent / "baseline_images").exists():
6+
raise IOError(
7+
'The baseline image directory does not exist. '
8+
'This is most likely because the test data is not installed. '
9+
'You may need to install matplotlib from source to get the '
10+
'test data.')
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from matplotlib.testing.conftest import (mpl_test_settings, # noqa
2+
pytest_configure, pytest_unconfigure)
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from pathlib import Path
2+
3+
4+
# Check that the test directories exist
5+
if not (Path(__file__).parent / "baseline_images").exists():
6+
raise IOError(
7+
'The baseline image directory does not exist. '
8+
'This is most likely because the test data is not installed. '
9+
'You may need to install matplotlib from source to get the '
10+
'test data.')
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from matplotlib.testing.conftest import (mpl_test_settings, # noqa
2+
pytest_configure, pytest_unconfigure)

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
+6-1Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,12 @@ def get_package_data(self):
487487
'tests/test_*.ipynb',
488488
],
489489
'mpl_toolkits': [
490-
*_pkg_data_helper('mpl_toolkits', 'tests/baseline_images'),
490+
*_pkg_data_helper('mpl_toolkits/axes_grid1',
491+
'tests/baseline_images'),
492+
*_pkg_data_helper('mpl_toolkits/axisartist'
493+
'tests/baseline_images'),
494+
*_pkg_data_helper('mpl_toolkits/mplot3d'
495+
'tests/baseline_images'),
491496
]
492497
}
493498

0 commit comments

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