(cls)
| 100 | |
| 101 | @classmethod |
| 102 | def setUpClass(cls): |
| 103 | assert cls.py_version is not None, 'Needs a python version tuple' |
| 104 | if not have_python_version(cls.py_version): |
| 105 | py_version_str = ".".join(map(str, cls.py_version)) |
| 106 | raise unittest.SkipTest(f'Python {py_version_str} not available') |
| 107 | cls.addClassCleanup(cls.finish_worker) |
| 108 | # Override the default pickle protocol to match what xpickle worker |
| 109 | # will be running. |
| 110 | highest_protocol = highest_proto_for_py_version(cls.py_version) |
| 111 | cls.enterClassContext(support.swap_attr(pickletester, 'protocols', |
| 112 | range(highest_protocol + 1))) |
| 113 | cls.enterClassContext(support.swap_attr(pickle, 'HIGHEST_PROTOCOL', |
| 114 | highest_protocol)) |
| 115 | |
| 116 | @classmethod |
| 117 | def start_worker(cls, python): |
nothing calls this directly
no test coverage detected