-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

yuppie wrote:
> Tres Seaver wrote:
>> Log message for revision 97800:
>>   Clean out module-scope imports.
>>
>> Changed:
>>   U   Products.CMFCore/trunk/Products/CMFCore/tests/test_CatalogTool.py
>>
>> -=-
>> Modified: Products.CMFCore/trunk/Products/CMFCore/tests/test_CatalogTool.py
>> ===================================================================
>> --- Products.CMFCore/trunk/Products/CMFCore/tests/test_CatalogTool.py        
>> 2009-03-10 12:59:04 UTC (rev 97799)
>> +++ Products.CMFCore/trunk/Products/CMFCore/tests/test_CatalogTool.py        
>> 2009-03-10 13:20:03 UTC (rev 97800)
>> @@ -16,17 +16,7 @@
>>  """
>>  
>>  import unittest
>> -import Testing
>>  
>> -from AccessControl.SecurityManagement import getSecurityManager
>> -from AccessControl.SecurityManagement import newSecurityManager
>> -from DateTime import DateTime
>> -from zope.interface.verify import verifyClass
>> -
>> -from Products.CMFCore.tests.base.dummy import DummyContent
>> -from Products.CMFCore.tests.base.dummy import DummySite
>> -from Products.CMFCore.tests.base.security import OmnipotentUser
>> -from Products.CMFCore.tests.base.security import UserWithRoles
>>  from Products.CMFCore.tests.base.testcase import SecurityTest
> 
> What was wrong with these imports?

I don't like module-scope imports in unit tests:  I want tests to
*fail*, not be skipped, when something is not importable.  I put my
rationale in this blog entry:


http://palladion.com/home/tseaver/obzervationz/2008/unit_testing_notes-20080724



Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tsea...@palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJtrFn+gerLs4ltQ4RAhOAAKCS/QoCbex5FOE+CevM4oPS0bVU5wCgocg7
bPxq/nV3CaSX/0CFtPvsaOQ=
=Wzi8
-----END PGP SIGNATURE-----

_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to