def test_perimetr(self, test_vars): side1 = Rectangl(test_vars) p = (test_vars[0] + test_vars[1]) * 2 if side1.perimetr() != p: print( f"Тестируемое число{side1.perimetr()}, сравнивается с расчетным {p}. Тест не пройден" ) assert side1.perimetr() == p
def test_area(self, test_vars): side1 = test_vars area = Rectangl(test_vars) test_area = test_vars[0] * test_vars[1] if area.area() != test_area: print( f"Тестируемое число{area.area()}, сравнивается с расчетным {test_area}. Тест не пройден" ) assert area.area() == test_area
def test_sum_area(self, test_triangl, test_rect): triangl = Triangl(test_triangl) rect = Rectangl(test_rect) sum = rect.calculatio() + triangl.calculatio() assert sum == rect.add_square(triangl)
def test_angels(self, test_angels): test_rect = Rectangl((8, 18)) assert test_rect.angels() == test_angels
def test_name(self, test_name_list): name = Rectangl((8, 18)) name.print() assert name.nameTrig() == test_name_list
def test_sum_area(self, test_circl, test_rect): circl = Circle(test_circl) rect = Rectangl(test_rect) sum = rect.calculatio() + circl.calculatio() assert sum == circl.add_square(rect)