Python unittest discovery with subfolders
问题 My unittest folder is organized this way. . |-- import | |-- import.kc | |-- import.kh | `-- import_test.py |-- module | |-- module.kc | |-- module.kh | `-- module_test.py `-- test.py I'd want to simply run test.py to run each of my *_test.py using unittest python module. Currently, my test.py contains #!/usr/bin/env python import unittest if __name__ == "__main__": suite = unittest.TestLoader().discover('.', pattern = "*_test.py") unittest.TextTestRunner(verbosity=2).run(suite) The python