Example #1
0
    def test_get_period_range_edges(self, first, last, offset, exp_first, exp_last):
        first = pd.Period(first)
        last = pd.Period(last)

        exp_first = pd.Period(exp_first, freq=offset)
        exp_last = pd.Period(exp_last, freq=offset)

        offset = pd.tseries.frequencies.to_offset(offset)
        result = _get_period_range_edges(first, last, offset)
        expected = (exp_first, exp_last)
        assert result == expected
    def test_get_period_range_edges(self, first, last, offset,
                                    exp_first, exp_last):
        first = pd.Period(first)
        last = pd.Period(last)

        exp_first = pd.Period(exp_first, freq=offset)
        exp_last = pd.Period(exp_last, freq=offset)

        offset = pd.tseries.frequencies.to_offset(offset)
        result = _get_period_range_edges(first, last, offset)
        expected = (exp_first, exp_last)
        assert result == expected