init
This commit is contained in:
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
15
tests/test1.py
Normal file
15
tests/test1.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import unittest
|
||||
from testpkg import test_add, test_sub
|
||||
|
||||
class TestModule1(unittest.TestCase):
|
||||
|
||||
def test_add(self):
|
||||
self.assertEqual(test_add(1, 2), 3)
|
||||
self.assertEqual(test_add(-1, 1), 0)
|
||||
|
||||
def test_subtract(self):
|
||||
self.assertEqual(test_sub(2, 1), 1)
|
||||
self.assertEqual(test_sub(2, 3), -1)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
Reference in New Issue
Block a user