Exemplo n.º 1
0
    def test_cached_range(self):
        rng = DatetimeIndex._cached_range(START, END, offset=datetools.bday)
        rng = DatetimeIndex._cached_range(START,
                                          periods=20,
                                          offset=datetools.bday)
        rng = DatetimeIndex._cached_range(end=START,
                                          periods=20,
                                          offset=datetools.bday)

        self.assertRaises(Exception, DatetimeIndex._cached_range, START, END)

        self.assertRaises(Exception,
                          DatetimeIndex._cached_range,
                          START,
                          freq=datetools.bday)

        self.assertRaises(Exception,
                          DatetimeIndex._cached_range,
                          end=END,
                          freq=datetools.bday)

        self.assertRaises(Exception,
                          DatetimeIndex._cached_range,
                          periods=20,
                          freq=datetools.bday)
Exemplo n.º 2
0
    def test_cached_range(self):
        rng = DatetimeIndex._cached_range(START, END, offset=datetools.bday)
        rng = DatetimeIndex._cached_range(START,
                                          periods=20,
                                          offset=datetools.bday)
        rng = DatetimeIndex._cached_range(end=START,
                                          periods=20,
                                          offset=datetools.bday)

        assertRaisesRegexp(TypeError, "offset", DatetimeIndex._cached_range,
                           START, END)

        assertRaisesRegexp(TypeError,
                           "specify period",
                           DatetimeIndex._cached_range,
                           START,
                           offset=datetools.bday)

        assertRaisesRegexp(TypeError,
                           "specify period",
                           DatetimeIndex._cached_range,
                           end=END,
                           offset=datetools.bday)

        assertRaisesRegexp(TypeError,
                           "start or end",
                           DatetimeIndex._cached_range,
                           periods=20,
                           offset=datetools.bday)
Exemplo n.º 3
0
    def test_cached_range(self):
        rng = DatetimeIndex._cached_range(START, END, offset=datetools.bday)
        rng = DatetimeIndex._cached_range(START, periods=20, offset=datetools.bday)
        rng = DatetimeIndex._cached_range(end=START, periods=20, offset=datetools.bday)

        assertRaisesRegexp(TypeError, "offset", DatetimeIndex._cached_range, START, END)

        assertRaisesRegexp(TypeError, "specify period", DatetimeIndex._cached_range, START, offset=datetools.bday)

        assertRaisesRegexp(TypeError, "specify period", DatetimeIndex._cached_range, end=END, offset=datetools.bday)

        assertRaisesRegexp(TypeError, "start or end", DatetimeIndex._cached_range, periods=20, offset=datetools.bday)
Exemplo n.º 4
0
    def test_cached_range(self):
        rng = DatetimeIndex._cached_range(START, END, offset=datetools.cday)
        rng = DatetimeIndex._cached_range(START, periods=20, offset=datetools.cday)
        rng = DatetimeIndex._cached_range(end=START, periods=20, offset=datetools.cday)

        self.assertRaises(Exception, DatetimeIndex._cached_range, START, END)

        self.assertRaises(Exception, DatetimeIndex._cached_range, START, freq=datetools.cday)

        self.assertRaises(Exception, DatetimeIndex._cached_range, end=END, freq=datetools.cday)

        self.assertRaises(Exception, DatetimeIndex._cached_range, periods=20, freq=datetools.cday)
Exemplo n.º 5
0
    def test_cached_range(self):
        DatetimeIndex._cached_range(START, END, offset=CDay())
        DatetimeIndex._cached_range(START, periods=20,
                                    offset=CDay())
        DatetimeIndex._cached_range(end=START, periods=20,
                                    offset=CDay())

        self.assertRaises(Exception, DatetimeIndex._cached_range, START, END)

        self.assertRaises(Exception, DatetimeIndex._cached_range, START,
                          freq=CDay())

        self.assertRaises(Exception, DatetimeIndex._cached_range, end=END,
                          freq=CDay())

        self.assertRaises(Exception, DatetimeIndex._cached_range, periods=20,
                          freq=CDay())
Exemplo n.º 6
0
    def test_cached_range(self):
        DatetimeIndex._cached_range(START, END, offset=CDay())
        DatetimeIndex._cached_range(START, periods=20, offset=CDay())
        DatetimeIndex._cached_range(end=START, periods=20, offset=CDay())

        self.assertRaises(Exception, DatetimeIndex._cached_range, START, END)

        self.assertRaises(Exception,
                          DatetimeIndex._cached_range,
                          START,
                          freq=CDay())

        self.assertRaises(Exception,
                          DatetimeIndex._cached_range,
                          end=END,
                          freq=CDay())

        self.assertRaises(Exception,
                          DatetimeIndex._cached_range,
                          periods=20,
                          freq=CDay())