[ZODB-Dev] TmpStore missing loadBefore
Jim Fulton
jim at zope.com
Mon Jun 27 09:46:07 EDT 2005
Tim Peters wrote:
> [Tim Peters]
...
> More tests would be appreciated! Since nobody looks at most of this code
> most of the time, tests are the only reliable defense we have. Jim
> "confessed" last week that he deliberately didn't write TmpStore tests
> originally because TmpStore is "an internal implementation detail". You'll
> note that the new test I added didn't mention TmpStore either, except in
> comments. For that matter, the new test didn't use FileStorage either (it
> used MinimalMemoryStorage, which is a bare-bones storage used only in the
> test suite). Tests specifically against TmpStore would be welcome.
I wouldn't call what I said a "confession". I still do think that
TmpStore *is* an internal implementation detail and that tests of
actual public functionality are more important. I've seen lots of
cases in the past where internal components were tested directly with
the following disadvantages:
- test effort was wasted unnecessarily when implementation decisions were
changed,
- It was often hard to tell which test tested essential functionality
and which tested implementation accidents, this making refactoring more
difficult.
I think tests should be writted for real external apis. I think testing
internal implementation details is almost always waste of scarce resources.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the ZODB-Dev
mailing list