Open Nakaner opened 6 years ago
I think, it would be better if Nik4Image class contained everything related to calculations and image building (including run function) and some separate function did argument parsing. This could make possible to use Nik4 as a python module. It, probably, has nothing to do with unit testing, but since you created a class...
That's my plan for the next pull request but I did not want to change whole Nik4 in one go.
This pull request add some basic unit test for the calculation of the map size, bounding box, scale etc. based on the command line arguments. The unit tests are not complete. Instead, this pull request aims to make the code testable by adding a new class Nik4Image. Otherwise this pull request would become larger than it already is.
This pull request depends on https://github.com/Zverik/Nik4/pull/30 but I am open to rebase it on any other bug fix commit which does the same as https://github.com/Zverik/Nik4/pull/30
See also https://github.com/Zverik/Nik4/issues/31