(cls, start_method)
| 5760 | |
| 5761 | @classmethod |
| 5762 | def run_in_child(cls, start_method): |
| 5763 | import json |
| 5764 | mp = multiprocessing.get_context(start_method) |
| 5765 | r, w = mp.Pipe(duplex=False) |
| 5766 | p = mp.Process(target=cls.run_in_grandchild, args=(w,)) |
| 5767 | with warnings.catch_warnings(category=DeprecationWarning): |
| 5768 | p.start() |
| 5769 | grandchild_flags = r.recv() |
| 5770 | p.join() |
| 5771 | r.close() |
| 5772 | w.close() |
| 5773 | flags = (tuple(sys.flags), grandchild_flags) |
| 5774 | print(json.dumps(flags)) |
| 5775 | |
| 5776 | def test_flags(self): |
| 5777 | import json |