On Apr 12, 2008, at 10:01 PM, Tres Seaver wrote:
Even better: use the documented setuptools keyword[1]
'tests_require',
and get the testrunner / buildout to use that hook when running tests.
This doesn't address the central point that testing a different
software configuration in testing than will be used in production can
lead to unpleasant surprises in production.
As to tests_require, unfortunately, it can't be used by buildout or
any other setuptools-based application because it's presence isn't
reflected in egg info. :( This is why people who want to provide test
dependencies have been forced to use test extras. (tests_require is
only usable by the test runner setup command.
See http://mail.python.org/pipermail/distutils-sig/2007-January/007082.html
FWIW, I think using test extras is a necessary evil when testing
dependencies are significant. I wouldn't use it just to avoid a
dependency on zope.testing, but I would and have used test extras to
avoid more extensive dependencies.
Jim
--
Jim Fulton
Zope Corporation
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )