eagleflo / mpyq

Python library for reading MPQ archives.
BSD 2-Clause "Simplified" License
99 stars 23 forks source link

Unit tests #1

Closed eagleflo closed 13 years ago

eagleflo commented 14 years ago

mpyq definitely needs unit tests. I should actually have started with them, since most of development time was very exploratory. The main benefit I can currently see is protection against regressions -- now that the library is working, I want to refactor some methods inside without worrying about breaking anything. There isn't that much code yet so it's better to do it now than not at all.

eagleflo commented 13 years ago

I have now added a minimal regression test suite. Code like this isn't very simple to test, as you're supposed to test the external interface and I've managed to hide a lot of the internal stuff behind it. Still, this minimal suite should protect against catastrophic regressions.

eagleflo commented 12 years ago

I should probably reopen this issue, because the current "test harness" is almost a joke. There should be multiple different types of MPQ files tested for instance…