Protect what matters – even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
Former Member
5 years ago[25] Testing ?
I was wondering how you would recommend testing our scripts that make use of the CLI ?
There is for instance the --dry-run option, but do you use other means on your side ?
For instance, wou...
Former Member
5 years agoAh, I see you meant for programatic testing.
I am not at all familiar with the Python testing paradigms, but in the languages that I am familiar with (Go, Java, C++) I would encapsulate all the op interactions into a module/class/package, and replace it with a https://docs.python.org/3/library/unittest.mock.html#:%7E:text=call__%20method.-,The%20Mock%20Class,always%20return%20the%20same%20mock..