Closed
Description
Bug report
Bug summary
The tests for LogFormatter
do not explicitly test the return value of __call__
which allowed this bug #8594 to slip through.
We extensively test pprint_val
and that __call__
correctly skips formatting ticks when required
Code for reproduction
(prior to merging and backporting #8594 )
In [31]: fig, ax = plt.subplots()
In [32]: ax.xaxis.set_major_formatter(lf)
In [33]: lf(5)
Out[33]: ''
In [34]: lf(50)
Out[34]: ''
In [35]: lf(100)
In [36]: print(str(lf(100)))
None
In [37]: print(str(lf(1)))
None
In [38]: print(str(lf(10)))
None
In [39]: print(str(lf(10000)))
None
Actual outcome
Expected outcome
Not None
!
Matplotlib version
- Operating System: any
- Matplotlib Version: 2.0-2.0.1
- Python Version: any
- Jupyter Version (if applicable):
- Other Libraries: