Exemple #1
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])
Exemple #2
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])
Exemple #3
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])
Exemple #4
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)
Exemple #5
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])
Exemple #6
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])
Exemple #7
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])
Exemple #8
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)