Exemplo n.º 1
0
 def test_Isosceles_Triangle(self):
     """Tests positive input for isosceles triangle"""
     self.assertEqual(classify_Triangle(20,12,12), "Isosceles", '20,12,12 should be isosceles')
Exemplo n.º 2
0
 def test_Wrong_Type(self):
     """Tests invalid input but handles correctly"""
     self.assertEqual(classify_Triangle(1, "snow", 3), "InvalidInput")
Exemplo n.º 3
0
 def test_Not_A_Triangle(self):
     """Tests negative input for triangle but handles correctly"""
     self.assertEqual(classify_Triangle(4,9,2), "NotATriangle")
Exemplo n.º 4
0
 def test_Equilateral_Triangles(self):
     """Tests positive input for equilateral triangle """
     self.assertEqual(classify_Triangle(4,4,4),'Equilateral','1,1,1 should be equilateral')
Exemplo n.º 5
0
 def test_Right_Triangle_B(self): 
     """tests positive input for a right & scalene triangle with different order of lengths"""
     self.assertEqual(classify_Triangle(5,3,4),'Right and Scalene','5,3,4 is a Right triangle')
Exemplo n.º 6
0
 def test_Right_Triangle_A(self):
     """ tests positive input for a right and scalene triangle"""
     self.assertEqual(classify_Triangle(3,4,5),'Right and Scalene','3,4,5 is a Right triangle')