(pickle_module)
| 306 | |
| 307 | |
| 308 | def test_pickle_global_functions(pickle_module): |
| 309 | # Pickle global wrappers (manual or automatic) of registered functions |
| 310 | for name in pc.list_functions(): |
| 311 | try: |
| 312 | func = getattr(pc, name) |
| 313 | except AttributeError: |
| 314 | # hash_aggregate functions are not exported as callables. |
| 315 | continue |
| 316 | reconstructed = pickle_module.loads(pickle_module.dumps(func)) |
| 317 | assert reconstructed is func |
| 318 | |
| 319 | |
| 320 | def test_function_attributes(): |