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

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