예제 #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
파일: test_calc.py 프로젝트: Morbolk/14.10
 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
파일: test_calc.py 프로젝트: Morbolk/14.10
 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
파일: test_calc.py 프로젝트: Morbolk/14.10
 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')