[z3-five] Re: r14584 - z3/Five/branch/philikon-testing/browser/tests

Tres Seaver tseaver at palladion.com
Wed Jul 13 00:38:57 CEST 2005


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

philikon at codespeak.net wrote:
> Author: philikon
> Date: Tue Jul 12 22:53:07 2005
> New Revision: 14584
> 
> Modified:
>    z3/Five/branch/philikon-testing/browser/tests/test_recurse.py
> Log:
> atomify test

I think the preferred pattern is to pass the 'setUp' and 'tearDown'
methods to the ZopeDocFileTest constructor, which has arguments for them
(they don't help the narrative at all).

> Modified: z3/Five/branch/philikon-testing/browser/tests/test_recurse.py
> ==============================================================================
> --- z3/Five/branch/philikon-testing/browser/tests/test_recurse.py	(original)
> +++ z3/Five/branch/philikon-testing/browser/tests/test_recurse.py	Tue Jul 12 22:53:07 2005
> @@ -23,6 +23,9 @@
>      """
>      Test recursion
>  
> +      >>> from zope.app.tests.placelesssetup import setUp, tearDown
> +      >>> setUp()
> +
>      This test makes sure that recursion is avoided for view lookup.
>      First, we need to set up a stub interface...
>  
> @@ -60,11 +63,15 @@
>        'foo'
>        >>> ob()
>        'foo'
> +
> +
> +    Clean up:
> +
> +      >>> tearDown()
>      """
>  
>  def test_suite():
> -    from Testing.ZopeTestCase import installProduct, ZopeDocTestSuite
> -    installProduct('Five')
> +    from Testing.ZopeTestCase import ZopeDocTestSuite
>      return ZopeDocTestSuite()
>  
>  if __name__ == '__main__':


- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFC1EZz+gerLs4ltQ4RAlPPAJ4qZIP5pyKFv6ug5+qipSBOLD8zygCgiFFi
RA9kR9bCzZvH9+p0BuiTXaQ=
=V49l
-----END PGP SIGNATURE-----



More information about the z3-five mailing list