Esempio n. 1
0
 def test_whole(self):
     self.assertEqual("The (T)erritory of the triangle is: 6, sphereprogram.sphere(3,4,5))
Esempio n. 2
0
 def test_positive(self):
     self.assertEqual("The (T)erritory of the triangle is: 39.42, sphereprogram.sphere(12,12,23))
Esempio n. 3
0
 def test_string(self):
     self.assertEqual("The input cannot be converted to integer", sphereprogram.sphere("asd"))
Esempio n. 4
0
 def test_twonegative(self):
     self.assertEqual("The input parameter must be positive", sphereprogram.sphere(-5,-5,10))    
Esempio n. 5
0
 def test_zero(self):
     self.assertEqual("The input parameter must be positive", sphereprogram.sphere(0,0,0))
Esempio n. 6
0
 def test_positive(self):
     self.assertEqual(
         "The V(olume) of the sphere is: 33.49 The A(rea) of the sphere is: 50.24",
         sphereprogram.sphere(2))
Esempio n. 7
0
 def test_whole(self):
     self.assertEqual(
         "The V(olume) of the sphere is: 33493333.33 The A(rea) of the sphere is: 502400",
         sphereprogram.sphere(200))