[z3-five] Re: [z3-checkins] r10961 - z3/Five/branch/philikon-restructuring/browser/tests

Stefan H. Holek stefan at epy.co.at
Thu Apr 21 15:35:02 CEST 2005


Philipp,

It is important to have this line:

   from Products.Five.tests.fivetest import *

as the first import in each and every test module. You will get all the  
ZopeTestCase goodness through the fivetest module.

The reason is that fivetest is very careful to make sure that tests  
work in both Zope 2.7 with Five in INSTANCE_HOME as well as Zope 2.8  
with Five in SOFTWARE_HOME (and any combination thereof). It is not  
pretty, but necessary.

Cheers,
Stefan


On 21. Apr 2005, at 12:14, philikon at codespeak.net wrote:

> Author: philikon
> Date: Thu Apr 21 12:14:28 2005
> New Revision: 10961
>
> Modified:  
> z3/Five/branch/philikon-restructuring/browser/tests/ 
> test_absoluteurl.py
> ======================================================================= 
> =======
> ---  
> z3/Five/branch/philikon-restructuring/browser/tests/ 
> test_absoluteurl.py	(original)
> +++  
> z3/Five/branch/philikon-restructuring/browser/tests/ 
> test_absoluteurl.py	Thu Apr 21 12:14:28 2005
> @@ -14,6 +14,7 @@
>  if __name__ == '__main__':
>      execfile(os.path.join(sys.path[0], 'framework.py'))
>
> +import unittest
>  from Testing.ZopeTestCase import ZopeTestCase, installProduct
>  installProduct('Five')
>
> @@ -58,5 +59,10 @@
>              {'url': 'http://nohost/test_folder_1_/testoid', 'name':  
> 'testoid'})
>          self.assertEquals(expected, view.breadcrumbs())
>
> +def test_suite():
> +    suite = unittest.TestSuite()
> +    suite.addTest(unittest.makeSuite(AbsoluteURLTests))
> +    return suite
> +
>  if __name__ == '__main__':
>      framework()
>
> Modified:  
> z3/Five/branch/philikon-restructuring/browser/tests/test_resource.py
> ======================================================================= 
> =======
> ---  
> z3/Five/branch/philikon-restructuring/browser/tests/test_resource.py	 
> (original)
> +++  
> z3/Five/branch/philikon-restructuring/browser/tests/test_resource.py	 
> Thu Apr 21 12:14:28 2005
> @@ -14,6 +14,7 @@
>  if __name__ == '__main__':
>      execfile(os.path.join(sys.path[0], 'framework.py'))
>
> +import unittest
>  from Testing.ZopeTestCase import ZopeTestCase, FunctionalTestCase
>  from Testing.ZopeTestCase import installProduct
>  installProduct('Five')
> _______________________________________________
> z3-checkins mailing list
> z3-checkins at codespeak.net
> http://codespeak.net/mailman/listinfo/z3-checkins
>

--
Software Engineering is Programming when you can't. --E. W. Dijkstra



More information about the z3-five mailing list