[Zope-Coders] Help with Unit Testing
Shane Hathaway
shane@zope.com
Mon, 12 Aug 2002 14:07:32 -0400 (EDT)
On Mon, 12 Aug 2002, Chris Withers wrote:
> So where should these imports be included now?
Put the imports in the test methods or the setUp() method.
> Well, maybe someone can explain all the StorageErrors I get with the Windows
> test runner then? ;-)
Are you importing the Testing package before the Zope package?
> However, no-one has addressed the real problem yet, I'm afraid :-(
> DirectoryViews, are, unfortunately predictated on the filesystem. They need to
> be tested, and the only way I can think of to do this is to modify files on the
> filesystem.
>
> Until someone can suggest a better way, I propose that this form of testing
> remains as it is.
>
> Anyone got any suggestions?
You could create the skins in the tempfile area (though you'll have to be
careful to *not* delete immediately after creation, which is a standard
Unixism.)
Shane