Closed johng42 closed 11 months ago
Should run tox locally through tox -efmt to reformat the code.
Also you can look into mock to fake the sys.exit() call.
fwiw, I created some unit tests for the plugin objects in my PR branch called threads here: https://github.com/craigerl/aprsd/pull/26
You can @mock.patch("sys.exit") as a decorator to your unit test method.
Add very basic unit tests for utils.
I had to make one small change to get_config - return an error rather than exit to make this function unit testable. There may be some pytest command the check for an override a sys.exit() call, but I don't know how to do that.
Tested on windows and whatever linux flavor used in the pipeline