Fixing tests
Fixing tests
Posted Apr 12, 2012 14:56 UTC (Thu) by man_ls (guest, #15091)In reply to: Fixing tests by dskoll
Parent article: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 security release
I am not comparing dicts, but files. My package generates files so I compare those to canonical versions. You can check it out for yourself, it is called eLyXer. Perhaps it is not a canonical technique but it works well enough: less than a minute on a netbook for 48 rather sophisticated test files. Hash order has given me certain trouble in the past, but for a different task: parsing a config file and generating a Python preferences file. I am not even sure if my tests would run correctly or not, but I am not eager to try it.
And it seems that I am not alone: in the bug discussion people discuss about the change breaking a lot of the Python unit tests and their doctests. This kind of work is not hard to solve but a bit obnoxious; I would myself prefer to order all items instead of performing deep comparisons. With my testing technique of comparing result files I would have no choice anyway.
