A little guide to help you test your Python code with framework unittest.
venv:
python3 -m venv .venv && . .venv/bin/activate
Install:
In both environments you will need to install it only once.
pip install mock
pip install requests
pip install coverage
pip install SQLAlchemy
Running Tests:
python -m unittest discover -v
python -m unittest discover example1/
python -m unittest discover -p 'test_*.py'
Coverage:
coverage run -m unittest discover -v
coverage report -m
coverage html
coverage run -m unittest discover && coverage report -m && coverage html