示例#1
0
 def test_oper_neg4(self):
     """Без переменной Число2"""
     self.assertEqual(calc_me(1, None, "+"), 'ERROR: send me Number2')
示例#2
0
 def test_div_neg(self):
     """Негативный, деление на ноль"""
     self.assertEqual(calc_me(12, 0, "/"), 'ERROR: Divide by zero!')
示例#3
0
 def test_add(self):
     "Сложение"
     self.assertEqual(calc_me(1, 2, "+"), 3)
示例#4
0
 def test_cymbols(self):
     """Введение символов в качестве переменных"""
     self.assertEqual(calc_me("a","b","+"), "ERROR: now it is does not supported")
示例#5
0
 def test_mul(self):
     "Умножение"
     self.assertEqual(calc_me(12345679, 8, "*"), 98765432)
示例#6
0
 def test_symbol_y_neg(self):
     """Негативный, y - символ"""
     self.assertEqual(calc_me(2, 'b', '+'),
                      'ERROR: now it is does not supported')
示例#7
0
 def test_none_y_neg(self):
     """Негативный, y отсутствует"""
     self.assertEqual(calc_me(3, None, '+'), 'ERROR: send me Number2')
示例#8
0
 def test_oper_neg(self):
     self.assertEqual(calc_me(4, 2, "^"), 16)
示例#9
0
 def test_non1(self):
     "Без переменных 1"
     self.assertEqual(calc_me(None, 2,"/"), 'ERROR: send me Number1')
示例#10
0
 def test_number2(self):
     "Негативный. Если y не присвоили значение"
     self.assertEqual(calc_me(x=1, y=None), 'ERROR: send me Number2')
示例#11
0
 def test_div_neg(self):
     self.assertEqual(calc_me(12, 0, "/"), 'ERROR: Division by zero!')
示例#12
0
 def no_number(self):
     self.assertEqual(calc_me("","",'+,-,*,/' ), 'ERROR: send me Number1')
示例#13
0
 def symbol(self):
     """Символы в переменных"""
     self.assertEqual(calc_me('x', 'y', '+,-,*,/'), 'ERROR: now it is does not supported')
示例#14
0
 def test_stepen(self):
     "Степень"
     self.assertEqual(calc_me(2, 5, '^'), 32)
示例#15
0
 def test_oper_neg(self):
     """Негативный, логарифм"""
     self.assertEqual(calc_me(4, 2, "log"), 'ERROR: Uknow operation')
示例#16
0
 def test_non2(self):
     "Без переменных 2"
     self.assertEqual(calc_me(5, None,"-"), 'ERROR: send me Number2')
示例#17
0
 def test_symbol_x_neg(self):
     """Негативный, х - символ"""
     self.assertEqual(calc_me('a', 1, '-'),
                      'ERROR: now it is does not supported')
示例#18
0
 def test_oper_neg(self):
     """Не существующая операция"""
     self.assertEqual(calc_me(8, 2,"@"), 'ERROR: Uknow operation')
示例#19
0
 def test_none_x_neg(self):
     """Негативный, х отсутствует"""
     self.assertEqual(calc_me(None, 5, '-'), 'ERROR: send me Number1')
示例#20
0
 def test_sim(self):
     """Символ в переменных"""
     self.assertEqual(calc_me("&", "$","/"), 'ERROR: now it is does not supported') 
示例#21
0
 def test_oper(self):
     "Возведение в степень"
     self.assertEqual(calc_me(4, 2, "^"), 16)
示例#22
0
 def test_exp(self):
     "Возведение в степень"
     self.assertEqual(calc_me(4, 3, "^"), 64)
示例#23
0
 def test_null_1(self):
     """Отсутствие переменной"""
     self.assertEqual(calc_me(None, 2, "+"), "ERROR: send me Number1")
示例#24
0
 def test_enter_string(self):
     "Негативный, ввод символа"
     self.assertEqual(calc_me('a', 'b', "-"),
                      "ERROR: now it is does not supported")
示例#25
0
 def test_div(self):
     "Деление"
     self.assertEqual(calc_me(111111111, 9, "/"), 12345679)
示例#26
0
 def test_enter_none(self):
     "Негативный, пустой ввод"
     self.assertEqual(calc_me(None, 3, "*"), "ERROR: send me Number1")
示例#27
0
 def test_oper_neg(self):
     """Негативный, возведение в степень"""
     self.assertEqual(calc_me(4, 2, "^"), 'ERROR: Uknow operation')
示例#28
0
 def test_exponent(self):
     """Возведение в степень"""
     self.assertEqual(calc_me(2, 3, '^'), 8)
示例#29
0
 def test_sub(self):
     "Вычитание"
     self.assertEqual(calc_me(4, 2, "-"), 2)
示例#30
0
 def test_oper_neg3(self):
     """Без переменной Число1"""
     self.assertEqual(calc_me(None, 1, "+"), 'ERROR: send me Number1')