(tmpdir, id="")
| 183 | |
| 184 | |
| 185 | def make_custompy(tmpdir, id=""): |
| 186 | if sys.platform == "win32": |
| 187 | custompy = tmpdir / ("custompy" + id + ".cmd") |
| 188 | script = """@echo off |
| 189 | set DEBUGPY_CUSTOM_PYTHON=<id>;%DEBUGPY_CUSTOM_PYTHON% |
| 190 | <python> %* |
| 191 | """ |
| 192 | else: |
| 193 | custompy = tmpdir / ("custompy" + id + ".sh") |
| 194 | script = """#!/bin/sh |
| 195 | env "DEBUGPY_CUSTOM_PYTHON=<id>;$DEBUGPY_CUSTOM_PYTHON" <python> "$@" |
| 196 | """ |
| 197 | |
| 198 | script = script.replace("<id>", id) |
| 199 | script = script.replace("<python>", sys.executable) |
| 200 | custompy.write(script) |
| 201 | os.chmod(custompy.strpath, 0o777) |
| 202 | |
| 203 | return custompy.strpath |
| 204 | |
| 205 | |
| 206 | @pytest.mark.parametrize("run", runners.all_launch) |
no test coverage detected
searching dependent graphs…