예제 #1
0
 def test_division(self):
     assert 2 == calculator.devide(4, 2)
예제 #2
0
 def test_caclulator6(self):
     first = 20
     second = 2
     expected = 10
     result = devide(first, second)
     assert expected == result
예제 #3
0
import calculator

print(calculator.plus(10, 30))
print(calculator.minus(10, 30))
print(calculator.multiple(10, 30))
print(calculator.devide(10, 30))
 def test_division(self):
     assert 10 == calculator.devide(100, 10)
예제 #5
0
def test_devide_ZeroDivisionError_exercise_5(arg):
    with pytest.raises(ZeroDivisionError):
        calculator.devide(arg[0], arg[1])
예제 #6
0
def test_divide_exercise_4(arg, answ):
    assert calculator.devide(arg[0], arg[1]) == answ
예제 #7
0
def test_divide():
    assert 2 == calculator.devide(10, 5)