def test_snapshot_save_attr(self):
    snapshot = tracemalloc.take_snapshot()
    snapshot.test_attr = 'new'
    snapshot.dump(support.TESTFN)
    self.addCleanup(support.unlink, support.TESTFN)
    snapshot2 = tracemalloc.Snapshot.load(support.TESTFN)
    self.assertEqual(snapshot2.test_attr, 'new')
def test_snapshot_save_attr(self):
    snapshot = tracemalloc.take_snapshot()
    snapshot.test_attr = 'new'
    snapshot.dump(support.TESTFN)
    self.addCleanup(support.unlink, support.TESTFN)
    snapshot2 = tracemalloc.Snapshot.load(support.TESTFN)
    self.assertEqual(snapshot2.test_attr, 'new')