| 61 | |
| 62 | |
| 63 | def test_pickleablility() -> None: |
| 64 | # we have to modify the doctree so we can pickle it |
| 65 | copy = original.copy() |
| 66 | copy.reporter = None # type: ignore[assignment] |
| 67 | copy.transformer = None # type: ignore[assignment] |
| 68 | copy.settings.warning_stream = None |
| 69 | copy.settings.env = None |
| 70 | copy.settings.record_dependencies = DependencyList() |
| 71 | loaded = pickle.loads(pickle.dumps(copy, pickle.HIGHEST_PROTOCOL)) |
| 72 | assert all(getattr(n, 'uid', False) for n in loaded.findall(is_paragraph)) |
| 73 | |
| 74 | |
| 75 | def test_modified() -> None: |