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

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