Open felixbur opened 1 year ago
Since Nkululeko is mainly a collection of Python CLI (not imported as modules), with argparse and configparser, the conventional way to use Python test is little bit difficult. There is a discussion here with many proposed solutions.
https://stackoverflow.com/questions/13493288/python-cli-program-unit-testing
With the current test using bash shell for each module, it will become very difficult in the future to test all functionalities. But test is a must. We should try or choose options than the current shell test. Perhaps to try pytest as you showed above.
Here is an example
tests/test_to_db.py
: