Esempio n. 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]
Esempio n. 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
Esempio n. 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]
Esempio n. 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])
Esempio n. 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])
Esempio n. 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])
Esempio n. 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)
Esempio n. 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]