Commit 7cc3bf1e authored by Nicolas Wavrant's avatar Nicolas Wavrant

wip fixup

parent ec1a7f1e
Pipeline #10363 failed with stage
in 0 seconds
......@@ -3165,25 +3165,38 @@ class TestZodbDocumentComponentReload(TestZodbDocumentComponent):
def testAsComposedDocumentDoesntLeakTypes(self):
from pympler import muppy
import gc
import types
movement = self.portal.newContent(portal_type='Movement')
movement.asComposedDocument()
gc.collect()
all_object_list = muppy.get_objects()
class_object_list = muppy.filter(all_object_list, Type=types.ClassType)
type_object_list = muppy.filter(all_object_list, Type=types.TypeType)
self.assertEqual(
sorted(class_object_list),
sorted(class_object_list),
)
self.assertEqual(
sorted(type_object_list),
sorted(type_object_list),
)
movement = self.portal.newContent(portal_type='Movement')
for _ in range(10):
movement.asComposedDocument()
self.tic()
gc.collect()
all_object_list = muppy.get_objects()
self.assertEqual(
class_object_list,
class_object_list,
muppy.filter(all_object_list, Type=types.ClassType),
)
self.assertEqual(
type_object_list,
muppy.filter(all_object_list, Type=types.TypeType)
sorted(type_object_list),
sorted(muppy.filter(all_object_list, Type=types.TypeType))
)
def _setBusinessProcessComponentTextContent(self, value):
......
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