(cls, start_method)
| 5429 | |
| 5430 | @classmethod |
| 5431 | def run_in_child(cls, start_method): |
| 5432 | import json |
| 5433 | mp = multiprocessing.get_context(start_method) |
| 5434 | r, w = mp.Pipe(duplex=False) |
| 5435 | p = mp.Process(target=cls.run_in_grandchild, args=(w,)) |
| 5436 | with warnings.catch_warnings(category=DeprecationWarning): |
| 5437 | p.start() |
| 5438 | grandchild_flags = r.recv() |
| 5439 | p.join() |
| 5440 | r.close() |
| 5441 | w.close() |
| 5442 | flags = (tuple(sys.flags), grandchild_flags) |
| 5443 | print(json.dumps(flags)) |
| 5444 | |
| 5445 | def test_flags(self): |
| 5446 | import json |