()
| 90 | |
| 91 | |
| 92 | def test_date_empty(): |
| 93 | # make sure we do the right thing when told to plot dates even |
| 94 | # if no date data has been presented, cf |
| 95 | # http://sourceforge.net/tracker/?func=detail&aid=2850075&group_id=80706&atid=560720 |
| 96 | fig, ax = plt.subplots() |
| 97 | ax.xaxis_date() |
| 98 | fig.draw_without_rendering() |
| 99 | np.testing.assert_allclose(ax.get_xlim(), |
| 100 | [mdates.date2num(np.datetime64('1970-01-01')), |
| 101 | mdates.date2num(np.datetime64('1970-01-02'))]) |
| 102 | |
| 103 | mdates._reset_epoch_test_example() |
| 104 | mdates.set_epoch('0000-12-31') |
| 105 | fig, ax = plt.subplots() |
| 106 | ax.xaxis_date() |
| 107 | fig.draw_without_rendering() |
| 108 | np.testing.assert_allclose(ax.get_xlim(), |
| 109 | [mdates.date2num(np.datetime64('1970-01-01')), |
| 110 | mdates.date2num(np.datetime64('1970-01-02'))]) |
| 111 | mdates._reset_epoch_test_example() |
| 112 | |
| 113 | |
| 114 | def test_date_not_empty(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…