unittest
in python3# test/test_module.py
import unittest
from library import module
class TestModule(unittest.TestCase):
def test_function(self):
self.assertTrue(module.function())
Call it from the shell with $>python3 -m unittest
.
Organizing test into a tree does require the __init__.py
file in each subdir.