def __testMinuteRangeImpl(self, timezone=None):
        freq = bar.Frequency.MINUTE

        begin = datetime.datetime(2011, 1, 1, 1, 1)
        end = datetime.datetime(2011, 1, 1, 1, 2)
        if timezone is not None:
            begin = dt.localize(begin, timezone)
            end = dt.localize(end, timezone)

        r = resamplebase.build_range(begin + datetime.timedelta(seconds=5), freq)
        self.assertEqual(r.getBeginning(), begin)
        for i in range(freq):
            self.assertTrue(r.belongs(begin + datetime.timedelta(seconds=i)))
        self.assertFalse(r.belongs(begin + datetime.timedelta(seconds=freq+1)))
        self.assertEqual(r.getEnding(), end)
dataset/ETHPy150Open gbeced/pyalgotrade/testcases/resample_test.py/IntraDayRange.__testMinuteRangeImpl/original