Skip to main content

Tests and documentation good but different

·1 min

I’ve long held that doctests are no way to test code. Andrew Bennetts explains the problems with narrative tests and why tests are better written in code rather than text.

Recently, the Zope developer community has started taking these ideas seriously, and is starting to change its testing strategy. This can only be a win for them: better test coverage and documentation driven by user needs.