Exemple #1
0
 def test_overlap_examples(self):
     ref_cube = get_ref_cube()
     self.assertTrue(
         cubes_overlap(parse_cube_defn("on x=-20..26,y=-36..17,z=-47..7"),
                       ref_cube))
     self.assertTrue(
         cubes_overlap(parse_cube_defn("on x=-20..33,y=-21..23,z=-26..28"),
                       ref_cube))
Exemple #2
0
 def test_no_overlap_examples(self):
     ref_cube = get_ref_cube()
     self.assertFalse(
         cubes_overlap(
             parse_cube_defn(
                 "on x=-54112..-39298,y=-85059..-49293,z=-27449..7877"),
             ref_cube))
     self.assertFalse(
         cubes_overlap(
             parse_cube_defn(
                 "on x=967..23432,y=45373..81175,z=27513..53682"),
             ref_cube))
Exemple #3
0
 def test_y_above(self):
     ref_cube = get_ref_cube()
     other_cube = parse_cube_defn("on x=-20..26,y=51..50,z=-36..17")
     self.assertFalse(cubes_overlap(ref_cube, other_cube))
Exemple #4
0
 def test_y_below(self):
     ref_cube = get_ref_cube()
     other_cube = parse_cube_defn("on x=-20..26,y=-60..-51,z=-36..17")
     self.assertFalse(cubes_overlap(ref_cube, other_cube))