Commit 39b9725f authored by Jason Madden's avatar Jason Madden

Clean up monkey-patching of picklecache._SWEEPABLE_TYPES by the test case.

parent 6f7d9f9a
......@@ -968,16 +968,15 @@ class PickleCacheTests(unittest.TestCase):
import persistent.picklecache
sweep_types = persistent.picklecache._SWEEPABLE_TYPES
persistent.picklecache._SWEEPABLE_TYPES = DummyPersistent
try:
persistent.picklecache._SWEEPABLE_TYPES = DummyPersistent
self.assertEqual(cache.full_sweep(), 0)
persistent.picklecache._SWEEPABLE_TYPES = sweep_types
del p._p_deactivate
self.assertEqual(cache.full_sweep(), 1)
finally:
persistent.picklecache._SWEEPABLE_TYPES = sweep_types
del p._p_deactivate
self.assertEqual(cache.full_sweep(), 1)
if _is_jython:
def with_deterministic_gc(f):
def test(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment