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
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)
def test_check_light_geometry_negative_d(self): result = geometry.check_light_geometry(6, 4, [(4, 2)]) self.assertFalse(result)
def test_check_light_geometry_positive_1(self): result = geometry.check_light_geometry(6, 4, [(3, 2)]) self.assertTrue(result)