Make sets and deques weak referencable.
diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
index 3a85c76..514b75c 100644
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -1,5 +1,6 @@
import unittest
from test import test_support
+from weakref import proxy
import operator
import copy
import pickle
@@ -346,6 +347,13 @@
else:
self.assert_(c not in self.s)
+ def test_weakref(self):
+ s = self.thetype('gallahad')
+ p = proxy(s)
+ self.assertEqual(str(p), str(s))
+ s = None
+ self.assertRaises(ReferenceError, str, p)
+
class SetSubclass(set):
pass