コード例 #1
0
 def test_factorial_numero_valor_0(self):
     assert factorial(0) == 1
コード例 #2
0
 def test_factorial_numero_negativo(self):
     with self.assertRaises(AssertionError):
         factorial(-3)
コード例 #3
0
 def test_factorial_cadena(self):
     with self.assertRaises(AssertionError):
         factorial("hola")
コード例 #4
0
 def test_factorial_numero_entero_positivo(self):
     assert factorial(5) == 120
コード例 #5
0
 def test_variacion_2_factorial_entero(self):
     assert variacion(2, factorial(3)) == 30
コード例 #6
0
 def test_combinatoria_factorial_menor_factorial_mayor(self):
     assert convinatoria(factorial(0),factorial(2))==2
コード例 #7
0
 def test_factorial_convinatoria_mayor_menor(self):
     with self.assertRaises(AssertionError):
         factorial(convinatoria(5, 4))