I have a small command line application (about 6k lines). He does not have unit tests because I did not know how to write them; but I'm retroactively adding some now. I read this tutorial , but I was left puzzled by how to test the entire application using this module; in fact, I'm not even sure that what I want to do is called a "unit test".
In particular, if I run my application with certain parameters, it should generate certain output files. I want these output files not to change.
Namely, the following command line calls to my application:
main.py config1.txt 100 15 main.py config2.txt def 10 qa etc.....
create several small text output files (<10 MB each) and place them in separate folders (one for each call), named like this:
output/config1.100.15.201202011733/ output/config2.def.10.qa.201202011733/ etc...
Each folder contains several small text files (<10 MB each). After each iteration of the code changes, I would like to run my application with dozens of command line options and note any cases where the output files are different. (Ideally, I would like to do more, for example, for some output files, compare them as tab-delimited tables with a specific primary key, so if the order of the lines changes, they will still be evaluated as equal, but this is not so critical )
What a good way to set this up?
source share