[Zope-Checkins]
SVN: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py
Clean up after ourselves.
Tres Seaver
tseaver at palladion.com
Wed Nov 30 21:15:15 EST 2005
Log message for revision 40440:
Clean up after ourselves.
Changed:
U Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py
-=-
Modified: Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py
===================================================================
--- Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2005-12-01 01:59:12 UTC (rev 40439)
+++ Zope/trunk/lib/python/AccessControl/tests/testZopeGuards.py 2005-12-01 02:15:15 UTC (rev 40440)
@@ -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