Returns true if the object can be dumped and loaded through the pickle module.
(obj)
| 80 | |
| 81 | |
| 82 | def is_pickable(obj): |
| 83 | """ |
| 84 | Returns true if the object can be dumped and loaded through the pickle |
| 85 | module. |
| 86 | """ |
| 87 | try: |
| 88 | pickle.loads(pickle.dumps(obj)) |
| 89 | except (AttributeError, TypeError, pickle.PickleError): |
| 90 | return False |
| 91 | return True |
| 92 | |
| 93 | |
| 94 | def assert_and_parse_html(self, html, user_msg, msg): |
no test coverage detected