Zverik / Nik4

Mapnik to image export
Do What The F*ck You Want To Public License
123 stars 23 forks source link

Add unit tests #31

Open Nakaner opened 6 years ago

Nakaner commented 6 years ago

The code which calculates the bounding box, scale, scale factor etc. has become quite long and it is likely to break something if you fix/add something different. @Zverik moved it into its own function recently. However, a few unit tests would benefit the project.

I started working on testability today. You can see progress in the branch unittest in my fork of this repository. To make testing easier, I created a new class Nik4Image. I will move more and more code from the main nik4.py file into it.

Feedback is welcome.