mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Update _weakrefset.py from 3.13.5 (#6004)
* Update `_weakrefset` from 3.13.5 * Update `test_weakset.py` from 3.13.5
This commit is contained in:
1 parent
9739592798
commit
4f9dd41041
2 files changed
+2
-5
No files matched your search
Vendored
+1
-2
@@ -80,8 +80,7 @@ class WeakSet:
|
||||
return wr in self.data
|
||||
|
||||
def __reduce__(self):
|
||||
return (self.__class__, (list(self),),
|
||||
getattr(self, '__dict__', None))
|
||||
return self.__class__, (list(self),), self.__getstate__()
|
||||
|
||||
def add(self, item):
|
||||
if self._pending_removals:
|
||||
|
||||
Vendored
+1
-3
@@ -44,7 +44,7 @@ class TestWeakSet(unittest.TestCase):
|
||||
def test_methods(self):
|
||||
weaksetmethods = dir(WeakSet)
|
||||
for method in dir(set):
|
||||
if method == 'test_c_api' or method.startswith('_'):
|
||||
if method.startswith('_'):
|
||||
continue
|
||||
self.assertIn(method, weaksetmethods,
|
||||
"WeakSet missing method " + method)
|
||||
@@ -458,8 +458,6 @@ class TestWeakSet(unittest.TestCase):
|
||||
self.assertIsInstance(self.s, Set)
|
||||
self.assertIsInstance(self.s, MutableSet)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_copying(self):
|
||||
for cls in WeakSet, WeakSetWithSlots:
|
||||
s = cls(self.items)
|
||||
|
||||
Reference in new issue
Block a user