Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1c27b5

Browse files
committed
Test LogFormatter.__call__ with tiny numbers
1 parent 06514d2 commit c1c27b5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/matplotlib/tests/test_ticker.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,13 @@ def test_LogFormatter_call(self, val):
882882
temp_lf.axis = FakeAxis()
883883
assert temp_lf(val) == str(val)
884884

885+
@pytest.mark.parametrize('val', [1e-323, 2e-323, 10e-323, 11e-323])
886+
def test_LogFormatter_call_tiny(self, val):
887+
# test coeff computation in __call__
888+
temp_lf = mticker.LogFormatter()
889+
temp_lf.axis = FakeAxis()
890+
temp_lf(val)
891+
885892

886893
class TestLogitFormatter:
887894
@staticmethod

0 commit comments

Comments
 (0)