def test_span(self): self.assertEquals(0, ar_downsample._span(Range1d(start=0, end=0))) self.assertEquals(2, ar_downsample._span(Range1d(start=0, end=2))) self.assertEquals(2, ar_downsample._span(Range1d(start=-2, end=0))) self.assertEquals(4, ar_downsample._span(Range1d(start=-2, end=2))) self.assertEquals(4, ar_downsample._span(Range1d(start=2, end=-2))) self.assertEquals(3, ar_downsample._span(Range1d(start=None, end=3))) self.assertEquals(3, ar_downsample._span(Range1d(start=3, end=None))) self.assertEquals(0, ar_downsample._span(Range1d(start=None, end=None)))