Example #1
0
 def test_union_normal_normal(self) -> None:
     bounds1 = Bounds(1, 3)
     bounds2 = Bounds(3, 5)
     bounds3 = bounds1.union(bounds2)
     assert bounds3 is not bounds1
     assert bounds3 is not bounds2
     assert list(bounds3) == [1, 2, 3, 4]
Example #2
0
 def test_union_empty_empty(self) -> None:
     bounds1 = Bounds()
     bounds2 = Bounds()
     bounds3 = bounds1.union(bounds2)
     assert bounds3 is not bounds1
     assert bounds3 is not bounds2
     assert len(bounds3) == 0
Example #3
0
 def test_union_empty_normal(self) -> None:
     bounds1 = Bounds()
     bounds2 = Bounds(3, 5)
     bounds3 = bounds1.union(bounds2)
     assert bounds3 is not bounds1
     assert bounds3 is not bounds2
     assert list(bounds3) == [3, 4]
Example #4
0
 def test_union_normal_normal(self):
     bounds1 = Bounds(1, 3)
     bounds2 = Bounds(3, 5)
     bounds3 = bounds1.union(bounds2)
     self.assertTrue(bounds3 is not bounds1)
     self.assertTrue(bounds3 is not bounds2)
     self.assertEquals(list(bounds3), [1, 2, 3, 4])
Example #5
0
 def test_union_normal_empty(self):
     bounds1 = Bounds(1, 3)
     bounds2 = Bounds()
     bounds3 = bounds1.union(bounds2)
     self.assertTrue(bounds3 is not bounds1)
     self.assertTrue(bounds3 is not bounds2)
     self.assertEquals(list(bounds3), [1, 2])
Example #6
0
 def test_union_empty_normal(self):
     bounds1 = Bounds()
     bounds2 = Bounds(3, 5)
     bounds3 = bounds1.union(bounds2)
     self.assertTrue(bounds3 is not bounds1)
     self.assertTrue(bounds3 is not bounds2)
     self.assertEquals(list(bounds3), [3, 4])
Example #7
0
 def test_union_empty_empty(self):
     bounds1 = Bounds()
     bounds2 = Bounds()
     bounds3 = bounds1.union(bounds2)
     self.assertTrue(bounds3 is not bounds1)
     self.assertTrue(bounds3 is not bounds2)
     self.assertEquals(len(bounds3), 0)
Example #8
0
 def test_union_normal_empty(self):
     bounds1 = Bounds(1, 3)
     bounds2 = Bounds()
     bounds3 = bounds1.union(bounds2)
     assert bounds3 is not bounds1
     assert bounds3 is not bounds2
     assert list(bounds3) == [1, 2]