From 51e06c31a722953f4aa7a1c0bb71b8ddd77a78d7 Mon Sep 17 00:00:00 2001 From: Eric Dill Date: Thu, 24 Dec 2015 10:38:31 -0500 Subject: [PATCH] MNT: Switch to WeakKeyDict --- pyqtgraph/tests/test_stability.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyqtgraph/tests/test_stability.py b/pyqtgraph/tests/test_stability.py index 7582d353..35da955b 100644 --- a/pyqtgraph/tests/test_stability.py +++ b/pyqtgraph/tests/test_stability.py @@ -34,7 +34,7 @@ itemTypes = [ widgets = [] items = [] -allWidgets = weakref.WeakSet() +allWidgets = weakref.WeakKeyDictionary() def crashtest(): @@ -99,7 +99,7 @@ def createWidget(): widget = randItem(widgetTypes)() widget.setWindowTitle(widget.__class__.__name__) widgets.append(widget) - allWidgets.add(widget) + allWidgets['widget'] = 1 p(" %s" % widget) return widget