示例#1
0
 def test_add(self):
     ans = add(2,3)
     expected = 5
     self.assertEqual(ans, expected)
示例#2
0
def test_add10and1gives11():
    """test case"""
    assert add(10, 1) == 11
示例#3
0
 def test_addition(self):
     self.assertEqual(add(2,2), 4)
示例#4
0
def test_add2and3gives5():
    """test case"""
    assert add(2, 3) == 5
示例#5
0
def test_add():
    assert add(1, 4) == 5
示例#6
0
 def test_add(self):
     a = 10
     b = 20
     expected = 30
     actual = add(a, b)
     self.assertEqual(expected, actual)
示例#7
0
def test_add() -> None:
    """Unit test for sum method in main module."""
    assert main.add(5, 10) == 15
示例#8
0
 def test_add(self):
     self.assertEqual(add(2, 3), 5)