[z3-five] maintaining the tests
Sidnei da Silva
sidnei at awkly.org
Tue Jun 22 15:01:29 MEST 2004
On Tue, Jun 22, 2004 at 11:43:04AM +0200, Martijn Faassen wrote:
| Hey,
|
| Replying to myself:
|
| Martijn Faassen wrote:
|
| >This leads to another question -- test_security is definity not the
| >easiest thing to read. One instance of this is that for some reason
| >doesn't follow the standard ZopeTestCase pattern, and overrides setUp()
| >and tearDown() instead of using afterSetUp() and beforeTearDown(). It
| >also mixes in CleanUp. I tried to remove it to bring it to the
| >ZopeTestCase pattern, but of course I couldn't get things to work.
Oh, I'm not that experienced with ZopeTestCase to be fair. I've mixed
in CleanUp to reset the zcml state. It would fail with a
DuplicationError on defining the Utilities service. Anyway, I don't
see a problem in doing this. Zope3 does very similar things, but they
have a helper called PlacelessSetup to do it.
| I also just discovered that test_security.py doesn't clean up after
| itself enough, causing subsequent tests to fail during
| unrestrictedTraverse(). I've disabled them from being picked up by the
| test runner for the time being.
Uhm. I'm surprised that it doesn't clean enough. I will try to dig
into that.
| [snip]
| >I also suspect that if we make a separate product to support
| >the security tests, along the lines of the way test_five does it, we
| >don't need this special casing.
|
| I hope that doing this will also allow us to enable test_security.py again.
I hope that is not needed *wink*.
--
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://www.enfoldsystems.com
http://plone.org/about/team#dreamcatcher
MESSAGE ACKNOWLEDGED -- The Pershing II missiles have been launched.
More information about the z3-five
mailing list