@@ -1843,6 +1843,27 @@ def test_small_range_loglocator(numticks):
18431843assert (np .diff (np .log10 (ll .tick_values (6 ,150 )))== 1 ).all ()
18441844
18451845
1846+ # https://github.com/matplotlib/matplotlib/pull/27609
1847+ # TODO: This test currently fails, as expected and it needs to be fixed...
1848+ # To do this completely correctly, we should figure out what are our limits
1849+ # for when do integers are interpreted eventually as infinities and why,
1850+ # and perhaps always work with np.float128 to increase accuracy as much as
1851+ # possible. Eitherway, we should document what is our limit and how it is
1852+ # related to the accuracy of np.float{64,128} and Python's native float
1853+ # which seems to be the same as np.float64 for this purpose...
1854+ def test_LogFormatter_almost_inf ():
1855+ fig ,ax = plt .subplots ()
1856+ # TODO: Figure out why 1e400 won't fail, but will make the ax.plot describe
1857+ # 1e400 as inf (and hence not print it, and hence not fail).
1858+ ax .plot ([1 ,2 ], [1 ,1e300 ])
1859+ ax .set_yscale ("log" )
1860+ fig .draw_without_rendering ()
1861+ almost_inf = ax .get_lines ()[0 ].get_ydata ()[1 ]
1862+ # TODO/WIP: remove of course when the above TODOs are fixed. Perhaps assert
1863+ # something with ydata...
1864+ assert True == False
1865+
1866+
18461867def test_NullFormatter ():
18471868formatter = mticker .NullFormatter ()
18481869assert formatter (1.0 )== ''