Test that invalid value are formatted with empty string without raising exception.
(self, x)
| 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): |