8000 MNT: Rename example files with 'test' in name · matplotlib/matplotlib@27bbe3a · GitHub
[go: up one dir, main page]

Skip to content

Commit 27bbe3a

Browse files
MNT: Rename example files with 'test' in name
In PR 23130 it was noticed that certain example files had 'test' in their name and were getting picked up automatically by pytest accidentally. To avoid this, `testpaths = lib` was added to pytest.ini. While this is sufficient to avoid future problems, removing the word 'test' from example file names and replacing it with 'demo', which is commonly used in other matplotlib examples, provides future safeguards. To avoid causing broken links in the example documentation https://matplotlib.org/stable/gallery/index.html add `redirect-from` statements to the old file names as directed in https://matplotlib.org/stable/devel/documenting_mpl.html#moving-documentation.
1 parent f278686 commit 27bbe3a

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

examples/scales/log_test.py renamed to examples/scales/semilogx_demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Log Axis
44
========
55
6+
.. redirect-from:: /gallery/scales/log_test
7+
68
This is an example of assigning a log-scale for the x-axis using
79
`~.axes.Axes.semilogx`.
810
"""

examples/text_labels_and_annotations/usetex_baseline_test.py renamed to examples/text_labels_and_annotations/usetex_baseline.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Usetex Baseline Test
44
====================
55
6+
.. redirect-from:: /gallery/text_labels_and_annotations/usetex_baseline_test
7+
68
Comparison of text baselines computed for mathtext and usetex.
79
"""
810

examples/units/artist_tests.py renamed to examples/units/artist_demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Artist tests
44
============
55
6+
.. redirect-from:: /gallery/units/artist_tests
7+
68
Test unit support with each of the Matplotlib primitive artist types.
79
810
The axis handles unit conversions and the artists keep a pointer to their axis

examples/units/evans_test.py renamed to examples/units/evans_demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Evans test
44
==========
55
6+
.. redirect-from:: /gallery/units/evans_test
7+
68
A mockup "Foo" units class which supports conversion and different tick
79
formatting depending on the "unit". Here the "unit" is just a scalar
810
conversion factor, but this example shows that Matplotlib is entirely agnostic

0 commit comments

Comments
 (0)
0