(writer)
| 2988 | |
| 2989 | |
| 2990 | def _attach_to_writer_pid(writer): |
| 2991 | import pydevd |
| 2992 | |
| 2993 | assert writer.process is not None |
| 2994 | |
| 2995 | def attach(): |
| 2996 | attach_pydevd_file = os.path.join(os.path.dirname(pydevd.__file__), "pydevd_attach_to_process", "attach_pydevd.py") |
| 2997 | subprocess.call([sys.executable, attach_pydevd_file, "--pid", str(writer.process.pid), "--port", str(writer.port)]) |
| 2998 | |
| 2999 | threading.Thread(target=attach).start() |
| 3000 | |
| 3001 | wait_for_condition(lambda: writer.finished_initialization) |
| 3002 | |
| 3003 | |
| 3004 | @pytest.mark.skipif(not IS_CPYTHON or IS_MAC or not SUPPORT_ATTACH_TO_PID, reason="CPython only test (brittle on Mac).") |
no test coverage detected