[Zope-Checkins]
SVN: Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py
Clean up after ourselves.
Tres Seaver
tseaver at palladion.com
Wed Nov 30 20:59:12 EST 2005
Log message for revision 40439:
Clean up after ourselves.
Changed:
U Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py
-=-
Modified: Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py
===================================================================
--- Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py 2005-12-01 01:55:42 UTC (rev 40438)
+++ Zope/branches/2.9/lib/python/AccessControl/tests/testZopeGuards.py 2005-12-01 01:59:12 UTC (rev 40439)
@@ -395,10 +395,13 @@
_old_mgr = _old_policy = _marker = []
def setUp(self):
- pass
+ self._wrapped_dicts = []
def tearDown( self ):
self._restorePolicyAndManager()
+ for munged, orig in self._wrapped_dicts:
+ munged.update(orig)
+ del self._wrapped_dicts
def _initPolicyAndManager(self, manager=None):
from AccessControl.SecurityManagement import get_ident
@@ -644,6 +647,8 @@
# tell whether they're executed.
def _wrap_replaced_dict_callables(self, d):
import __builtin__
+ orig = d.copy()
+ self._wrapped_dicts.append((d, orig))
for k, v in d.items():
if callable(v) and v is not getattr(__builtin__, k, None):
d[k] = FuncWrapper(k, v)
More information about the Zope-Checkins
mailing list