コード例 #1
0
 def test_13(self):
     obj = operaciones()
     assert obj.basic_ops(1, 3, 7) \
            == "ENOSYS: Ingrese un valor válido (1-4)"
コード例 #2
0
 def test_11(self):
     obj = operaciones()
     assert obj.basic_ops(1, 130, 1) \
            == "EDQUOT: Ingresar un número entre -127 y 127"
コード例 #3
0
 def test_12(self):
     obj = operaciones()
     assert obj.array_ops([1, 2, 129], [4, 3, 6], 1) \
            == "EDQUOT: Ingresar un número entre -127 y 127"
コード例 #4
0
 def test_9(self):
     obj = operaciones()
     assert obj.basic_ops(4, 5.5, 1) == "EINVAL: Ingrese números enteros"
コード例 #5
0
 def test_10(self):
     obj = operaciones()
     assert obj.array_ops([1, 2, 3], [4, 'j', 6], 1) \
            == "EINVAL: Ingrese números enteros"
コード例 #6
0
 def test_8(self):
     obj = operaciones()
     assert obj.array_ops([1, 2, 3], [4, 5, 6], 1) == [5, 7, 9]
コード例 #7
0
 def test_4(self):
     obj = operaciones()
     assert obj.basic_ops(4, 1, 4) == 5
コード例 #8
0
 def test_3(self):
     obj = operaciones()
     assert obj.basic_ops(3, 1, 3) == 1
コード例 #9
0
 def test_2(self):
     obj = operaciones()
     assert obj.basic_ops(1, 3, 2) == -2
コード例 #10
0
 def test_1(self):
     # define la prueba 1
     obj = operaciones()
     # llama a obj como la clase operaciones
     assert obj.basic_ops(1, 2, 1) == 3