[Zope-Coders] Help with Unit Testing: safe imports
Jeremy Hylton
jeremy@alum.mit.edu
Mon, 19 Aug 2002 09:18:43 -0400
>>>>> "CD" == Casey Duncan <casey@zope.com> writes:
CD> We need a unit testing "Best Practices" wiki or something. This
CD> is making my brain hurt ;^)
I can't even remember why the import isn't at the module level. It
seems like the most natural choice.
With test.py (Zope 3 / StandaloneZODB), if there is an error during
module import, it prints a traceback and continues. If you use the -d
flag, it will fail on the ImportError.
Jeremy