def testintersection_update(self): c = Bitset(self.b2) c.intersection_update(self.b1) self.assertEqual(c, self.b2.intersection(self.b1)) c = Bitset(self.b1) c.intersection_update(self.b2) self.assertEqual(c, self.b1.intersection(self.b2)) c = Bitset(self.b1) c.intersection_update(self.b4) self.assertEqual(c, self.b1.intersection(self.b4))