MCPcopy Create free account
hub / github.com/cloudpipe/cloudpickle / test_itertools_count

Method test_itertools_count

tests/cloudpickle_test.py:2257–2269  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2255 "itertools.count() doesn't support pickle on Python 3.14+",
2256 )
2257 def test_itertools_count(self):
2258 counter = itertools.count(1, step=2)
2259
2260 # advance the counter a bit
2261 next(counter)
2262 next(counter)
2263
2264 new_counter = pickle_depickle(counter, protocol=self.protocol)
2265
2266 self.assertTrue(counter is not new_counter)
2267
2268 for _ in range(10):
2269 self.assertEqual(next(counter), next(new_counter))
2270
2271 def test_wraps_preserves_function_name(self):
2272 from functools import wraps

Callers

nothing calls this directly

Calls 1

pickle_depickleFunction · 0.85

Tested by

no test coverage detected