8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e51231 commit 03b3d28Copy full SHA for 03b3d28
lib/matplotlib/tests/test_dates.py
@@ -947,3 +947,16 @@ def test_change_epoch():
947
np.testing.assert_allclose(
948
mdates.date2num(np.datetime64('1970-01-01T12:00:00')),
949
0.5)
950
+
951
952
+def test_warn_notintervals():
953
+ dates = np.arange('2001-01-10', '2001-03-04', dtype='datetime64[D]')
954
+ locator = mdates.AutoDateLocator(interval_multiples=False)
955
+ locator.intervald[3] = [2]
956
+ locator.create_dummy_axis()
957
+ locator.set_view_interval(mdates.date2num(dates[0]),
958
+ mdates.date2num(dates[-1]))
959
+ with pytest.warns(UserWarning) as rec:
960
+ locs = locator()
961
+ assert len(rec) == 1
962
+ assert "AutoDateLocator was unable" in str(rec[0].message)
0 commit comments