How to discover and run unit tests programmatically in Python?
Sometimes you might want to run unittests from another Python script and gather its results instead of running python3 -m unittest manually. Running test cases programmatically is quite easy and gives you a lot of control on what happens during or after running the test cases.