

def test_deepcopy(self):
    a = DBRef('coll', 'asdf', 'db', x=[1])
    b = deepcopy(a)
    self.assertEqual(a, b)
    self.assertNotEqual(id(a), id(b.x))
    self.assertEqual(a.x, b.x)
    self.assertNotEqual(id(a.x), id(b.x))
    b.x[0] = 2
    self.assertEqual(a.x, [1])
    self.assertEqual(a.x, [2])

dataset/ETHPy150Open mongodb/mongo-python-driver/test/test_dbref.py TestDBRef.test_deepcopy/VarMisuse@118/136 `b`->`a`