(self)
| 311 | for kwargs_repr in kwargs_reprs]) |
| 312 | |
| 313 | def test_recursive_repr(self): |
| 314 | name = f"{self.partial.__module__}.{self.partial.__qualname__}" |
| 315 | |
| 316 | f = self.partial(capture) |
| 317 | f.__setstate__((f, (), {}, {})) |
| 318 | try: |
| 319 | self.assertEqual(repr(f), '%s(...)' % (name,)) |
| 320 | finally: |
| 321 | f.__setstate__((capture, (), {}, {})) |
| 322 | |
| 323 | f = self.partial(capture) |
| 324 | f.__setstate__((capture, (f,), {}, {})) |
| 325 | try: |
| 326 | self.assertEqual(repr(f), '%s(%r, ...)' % (name, capture,)) |
| 327 | finally: |
| 328 | f.__setstate__((capture, (), {}, {})) |
| 329 | |
| 330 | f = self.partial(capture) |
| 331 | f.__setstate__((capture, (), {'a': f}, {})) |
| 332 | try: |
| 333 | self.assertEqual(repr(f), '%s(%r, a=...)' % (name, capture,)) |
| 334 | finally: |
| 335 | f.__setstate__((capture, (), {}, {})) |
| 336 | |
| 337 | def test_pickle(self): |
| 338 | with replaced_module('functools', self.module): |
nothing calls this directly
no test coverage detected