[Zope-Checkins] CVS: Zope/lib/python/AccessControl/tests -
testImplementation.py:1.4
Brian Lloyd
brian at zope.com
Thu Jan 29 14:22:38 EST 2004
Update of /cvs-repository/Zope/lib/python/AccessControl/tests
In directory cvs.zope.org:/tmp/cvs-serv29595/lib/python/AccessControl/tests
Modified Files:
testImplementation.py
Log Message:
fix & document setImplementation semantics
=== Zope/lib/python/AccessControl/tests/testImplementation.py 1.3 => 1.4 ===
--- Zope/lib/python/AccessControl/tests/testImplementation.py:1.3 Fri Jan 16 13:49:23 2004
+++ Zope/lib/python/AccessControl/tests/testImplementation.py Thu Jan 29 14:22:38 2004
@@ -37,17 +37,27 @@
def tearDown(self):
setImplementation(self.original)
- def test_setImplemenationC(self):
- setImplementation("C")
- name = getImplementationName()
- if self.have_cAccessControl:
- self.assertEqual(name, "C")
- else:
- self.assertEqual(name, "PYTHON")
+## Note - this test is disabled because the intent for 2.7 was *not*
+## to support the ability to arbitrarily switch the security policy
+## at any time (which would currently be nearly impossible to do in
+## a way that would be sane for 3rd party apps that may already have
+## imported parts of the security machinery), but just to make sure
+## that the config file could be used to initially set the implementation
+## to be used. The policy setting is 'initialize once' - setImplementation
+## should not be called either by user code or unit tests, as the
+## effects are officially undefined.
+
+## def test_setImplemenationC(self):
+## setImplementation("C")
+## name = getImplementationName()
+## if self.have_cAccessControl:
+## self.assertEqual(name, "C")
+## else:
+## self.assertEqual(name, "PYTHON")
- def test_setImplemenationPython(self):
- setImplementation("Python")
- self.assertEqual(getImplementationName(), "PYTHON")
+## def test_setImplemenationPython(self):
+## setImplementation("Python")
+## self.assertEqual(getImplementationName(), "PYTHON")
def test_suite():
More information about the Zope-Checkins
mailing list