MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_hist_timedelta_raises

Function test_hist_timedelta_raises

lib/matplotlib/tests/test_axes.py:2494–2506  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2492
2493
2494def test_hist_timedelta_raises():
2495 import numpy as np
2496 import matplotlib.pyplot as plt
2497
2498 fig, ax = plt.subplots()
2499
2500 arr_np = np.array([1, 2, 5, 7], dtype="timedelta64[D]")
2501 with pytest.raises(TypeError, match="does not currently support timedelta inputs"):
2502 ax.hist(arr_np)
2503
2504 arr_py = [datetime.timedelta(seconds=i) for i in range(5)]
2505 with pytest.raises(TypeError, match="does not currently support timedelta inputs"):
2506 ax.hist(arr_py)
2507
2508
2509@image_comparison(['hist_bar_empty.png'], remove_text=True, style='_classic_test')

Callers

nothing calls this directly

Calls 2

histMethod · 0.80
subplotsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…