Skip to content

Commit f38a7d0

Browse files
committed
TST: Fixed part of a test that got displaced in all the changes somehow
1 parent 631e079 commit f38a7d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/tests/test_ticker.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,10 @@ def test_formatstrformatter():
499499
tmp_form = mticker.StrMethodFormatter('{x:05d}')
500500
assert '00002' == tmp_form(2)
501501

502+
# test str.format() style formatter with `pos`
503+
tmp_form = mticker.StrMethodFormatter('{x:03d}-{pos:02d}')
504+
assert '002-01' == tmp_form(2, 1)
505+
502506

503507
percentformatter_test_cases = (
504508
# Check explicitly set decimals over different intervals and values
@@ -530,10 +534,6 @@ def test_percentformatter(xmax, decimals, symbol, x, display_range, expected):
530534
formatter = mticker.PercentFormatter(xmax, decimals, symbol)
531535
assert formatter.format_pct(x, display_range) == expected
532536

533-
# test str.format() style formatter with `pos`
534-
tmp_form = mticker.StrMethodFormatter('{x:03d}-{pos:02d}')
535-
assert '002-01' == tmp_form(2, 1)
536-
537537

538538
def test_EngFormatter_formatting():
539539
"""

0 commit comments

Comments
 (0)