def test_reduce_interval(self):
        example = Example(self.minimum_data)
        example.reduce_interval(720)
        eq_(1415790000, example.period)
        eq_(datetime.datetime(2014, 11, 12, 12, 0), example.period_dt)
        eq_(720, example.interval)

        example.reduce_interval(1440)
        eq_(1415746800, example.period)
        eq_(datetime.datetime(2014, 11, 12, 0, 0), example.period_dt)
        eq_(1440, example.interval)
Beispiel #2
0
    def test_reduce_interval(self):
        example = Example(self.minimum_data)
        example.reduce_interval(720)
        eq_(1415790000, example.period)
        eq_(datetime.datetime(2014, 11, 12, 12, 0), example.period_dt)
        eq_(720, example.interval)

        example.reduce_interval(1440)
        eq_(1415746800, example.period)
        eq_(datetime.datetime(2014, 11, 12, 0, 0), example.period_dt)
        eq_(1440, example.interval)
 def test_reduce_interval_fail(self):
     example = Example(self.minimum_data)
     with assert_raises(ValueError):
         example.reduce_interval(1500)
Beispiel #4
0
 def test_reduce_interval_fail(self):
     example = Example(self.minimum_data)
     with assert_raises(ValueError):
         example.reduce_interval(1500)