diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py index 3e51977f1..78e0283a8 100644 --- a/Lib/test/test_set.py +++ b/Lib/test/test_set.py @@ -512,7 +512,6 @@ class TestSet(TestJointOps, unittest.TestCase): for c in (self.word + self.otherword): self.assertIn(c, self.s) - @unittest.skip("TODO: RUSTPYTHON") def test_intersection_update(self): retval = self.s.intersection_update(self.otherword) self.assertEqual(retval, None) diff --git a/vm/src/obj/objset.rs b/vm/src/obj/objset.rs index b68c459b7..e4d72a5f4 100644 --- a/vm/src/obj/objset.rs +++ b/vm/src/obj/objset.rs @@ -298,7 +298,7 @@ impl PySetInner { others: Args, vm: &VirtualMachine, ) -> PyResult<()> { - let temp_inner = self.copy(); + let mut temp_inner = self.copy(); self.clear(); for iterable in others { for item in iterable.iter(vm)? { @@ -307,6 +307,7 @@ impl PySetInner { self.add(&obj, vm)?; } } + temp_inner = self.copy() } Ok(()) }