()
| 1376 | |
| 1377 | |
| 1378 | def test_datetime_masked(): |
| 1379 | # make sure that all-masked data falls back to the viewlim |
| 1380 | # set in convert.axisinfo.... |
| 1381 | x = np.array([datetime.datetime(2017, 1, n) for n in range(1, 6)]) |
| 1382 | y = np.array([1, 2, 3, 4, 5]) |
| 1383 | m = np.ma.masked_greater(y, 0) |
| 1384 | |
| 1385 | fig, ax = plt.subplots() |
| 1386 | ax.plot(x, m) |
| 1387 | assert ax.get_xlim() == (0, 1) |
| 1388 | |
| 1389 | |
| 1390 | @pytest.mark.parametrize('val', (-1000000, 10000000)) |