예제 #1
0
def test_addition():
    actual = addition(3, 4)
    exceeded = 7
    assert exceeded == actual
예제 #2
0
 def test_addition(self):
     self.assertEqual(5, addition(2, 3))
예제 #3
0
def test_char1():
    with pytest.raises(TypeError):
        addition('a', 1)
예제 #4
0
def test_char2():
    with pytest.raises(TypeError):
        addition(1, 'b')
예제 #5
0
def test_addition3():
    actual = addition(0, 0)
    exceeded = 0
    assert exceeded == actual
예제 #6
0
def test_addition3():
    actual = addition(1, -2)
    exceeded = -1
    assert exceeded == actual
예제 #7
0
def test_addition2():
    actual = addition(-1, 2)
    exceeded = 1
    assert exceeded == actual
예제 #8
0
from app import addition

x, y = eval(input('Enter the value of x,y:'))
ans = addition(x, y)
print(f'Ans: {ans}')
예제 #9
0
 def test_addition(self):
     result = app.addition(3,5)
     self.assertEqual(result, 8)