This commit is contained in:
2024-12-27 00:28:01 -08:00
commit eb9b49c962
8 changed files with 54 additions and 0 deletions

0
tests/__init__.py Normal file
View File

15
tests/test1.py Normal file
View 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()