Beispiel #1
0
def __check_geometry(width, depth, light_positions):
    print('Перевірка рівномірності розташування світильників...')
    result = geometry.check_light_geometry(width, depth, light_positions)
    if (not result):
        print('Світильникі розташовані нерівномірно')
    else:
        print('Світильникі розташовані рівномірно')
    return result
Beispiel #2
0
 def test_check_light_geometry_positive(self):
     result = geometry.check_light_geometry(6, 4, [(3, 2), (1.5, 1),
                                                   (4.5, 3), (4.5, 1),
                                                   (1.5, 3)])
     self.assertTrue(result)
Beispiel #3
0
 def test_check_light_geometry_negative_d(self):
     result = geometry.check_light_geometry(6, 4, [(4, 2)])
     self.assertFalse(result)
Beispiel #4
0
 def test_check_light_geometry_positive_1(self):
     result = geometry.check_light_geometry(6, 4, [(3, 2)])
     self.assertTrue(result)