def test_to_hours_list(self): interval = Interval('test', [('PT0H', 'PT1H'), ('PT2H', 'PT3H'), ('PT5H', 'PT7H')]) actual = interval.to_hours() assert actual == [(0, 1), (2, 3), (5, 7)]
def test_load_remap_timeslices(self): interval = Interval('1', [('P2M', 'P3M'), ('P3M', 'P4M'), ('P4M', 'P5M')]) actual = interval.to_hours() assert actual == [(1416, 2160), (2160, 2880), (2880, 3624)]
def test_to_hours_month(self): interval = Interval('test', ('P2M', 'P3M')) actual = interval.to_hours() assert actual == [(1416, 2160)]
def test_to_hours_zero(self): interval = Interval('test', ('PT0H', 'PT1H')) actual = interval.to_hours() assert actual == [(0, 1)]