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

Method test_invalid

lib/matplotlib/tests/test_ticker.py:1373–1381  ·  view source on GitHub ↗

Test that invalid value are formatted with empty string without raising exception.

(self, x)

Source from the content-addressed store, hash-verified

1371
1372 @pytest.mark.parametrize("x", (-1, -0.5, -0.1, 1.1, 1.5, 2))
1373 def test_invalid(self, x):
1374 """
1375 Test that invalid value are formatted with empty string without
1376 raising exception.
1377 """
1378 formatter = mticker.LogitFormatter(use_overline=False)
1379 formatter.set_locs(self.decade_test)
1380 s = formatter(x)
1381 assert s == ""
1382
1383 @pytest.mark.parametrize("x", 1 / (1 + np.exp(-np.linspace(-7, 7, 10))))
1384 def test_variablelength(self, x):

Callers

nothing calls this directly

Calls 1

set_locsMethod · 0.95

Tested by

no test coverage detected