def test_iterator_pickling(self):
        data = {1:"a", 2:"b", 3:"c"}
        it = iter(data)
        d = pickle.dumps(it)
        it = pickle.loads(d)
        self.assertEqual(sorted(it), sorted(data))

        it = pickle.loads(d)
        try:
            drop = next(it)
        except __HOLE__:
            return
        d = pickle.dumps(it)
        it = pickle.loads(d)
        del data[drop]
        self.assertEqual(sorted(it), sorted(data))
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_dict.py/DictTest.test_iterator_pickling