How to unit test a Python function that draws PDF graphics?

前端 未结 5 1874
悲&欢浪女
悲&欢浪女 2020-12-09 10:01

I\'m writing a CAD application that outputs PDF files using the Cairo graphics library. A lot of the unit testing does not require actually generating the PDF files, such as

5条回答
  •  时光说笑
    2020-12-09 10:43

    I would try this using xpresser - (https://wiki.ubuntu.com/Xpresser ) You can try to match images to similar images not exact copies - which is the problem in these cases.

    I don't know if xpresser is being ctively developed, or if it can be used with stand alone image files (I think so) -- anyway it takes its ideas from teh Sikuli project (which is Java with a Jython front end, while xpresser is Python).

提交回复
热议问题