Remove the dependency on objgraph

This commit is contained in:
Lee Miller 2024-10-20 01:59:16 +03:00
parent c0cbac214e
commit 1879e28e94
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63
2 changed files with 6 additions and 5 deletions

View File

@ -2,7 +2,6 @@
import gc import gc
import time import time
import objgraph
from minode import shared from minode import shared
@ -50,6 +49,9 @@ class TestListener(TestProcessProto):
self.fail('The connection is alive') self.fail('The connection is alive')
gc.collect() gc.collect()
for c in objgraph.by_type('Connection'): for obj in gc.get_objects():
if c not in shared.connections: if (
self.fail('Connection %s remained in memory' % c) isinstance(obj, shared.connection)
and obj not in shared.connections
):
self.fail('Connection %s remains in memory' % obj)

View File

@ -1,3 +1,2 @@
coverage coverage
objgraph
psutil psutil