MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_basic

Method test_basic

lib/matplotlib/tests/test_ticker.py:1361–1370  ·  view source on GitHub ↗

Test the formatted value correspond to the value for ideal ticks in logit space.

(self, x)

Source from the content-addressed store, hash-verified

1359
1360 @pytest.mark.parametrize("x", decade_test)
1361 def test_basic(self, x):
1362 """
1363 Test the formatted value correspond to the value for ideal ticks in
1364 logit space.
1365 """
1366 formatter = mticker.LogitFormatter(use_overline=False)
1367 formatter.set_locs(self.decade_test)
1368 s = formatter(x)
1369 x2 = TestLogitFormatter.logit_deformatter(s)
1370 assert _LogitHelper.isclose(x, x2)
1371
1372 @pytest.mark.parametrize("x", (-1, -0.5, -0.1, 1.1, 1.5, 2))
1373 def test_invalid(self, x):

Callers

nothing calls this directly

Calls 3

set_locsMethod · 0.95
logit_deformatterMethod · 0.80
iscloseMethod · 0.80

Tested by

no test coverage detected