Skip to content

Commit dc401b3

Browse files
committed
TST: re-factor a bit and use better parameter names
1 parent 75ba0d5 commit dc401b3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/matplotlib/tests/test_patches.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ def test_annulus():
825825
ax.set_aspect('equal')
826826

827827

828-
@pytest.mark.parametrize('mode', ('a', 'b'))
828+
@pytest.mark.parametrize('mode', ('by_semiaxis', 'by_radius'))
829829
@image_comparison(baseline_images=['annulus'], extensions=['png'])
830830
def test_annulus_setters(mode):
831831

@@ -838,22 +838,23 @@ def test_annulus_setters(mode):
838838
ax.set_aspect('equal')
839839

840840
cir.center = (0.5, 0.5)
841-
if mode == 'a':
841+
ell.center = (0.5, 0.5)
842+
843+
if mode == 'by_semiaxis':
842844
cir.set_semimajor(0.2)
843845
cir.set_semiminor(0.2)
844846
assert cir.radii == (0.2, 0.2)
845-
elif mode == 'b':
846-
cir.radii = 0.2
847-
cir.width = 0.05
848847

849-
ell.center = (0.5, 0.5)
850-
if mode == 'a':
851848
ell.set_semimajor(0.5)
852849
ell.set_semiminor(0.3)
853850
assert ell.radii == (0.5, 0.3)
854-
elif mode == 'b':
851+
elif mode == 'by_radius':
852+
cir.radii = 0.2
855853
ell.radii = (0.5, 0.3)
854+
855+
cir.width = 0.05
856856
ell.width = 0.1
857+
857858
ell.angle = 45
858859

859860

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy