def test_reverse_cumulative_all_zero_warn(self): histo = Histogram(bin_width=0.5, bin_range=(1.0, 3.5)) histo._histogram = collections.Counter({(0,): 0, (1,): 0}) with pytest.warns(UserWarning, match=r"No non-zero"): rcumul = histo.reverse_cumulative() assert rcumul(3.12) == 0 for val in rcumul.values(): assert val == 0