(self, exe, *args)
| 382 | return env |
| 383 | |
| 384 | def _make_python_cmdline(self, exe, *args): |
| 385 | def normalize(s, strip_quotes=False): |
| 386 | # Convert py.path.local to string |
| 387 | if isinstance(s, py.path.local): |
| 388 | s = s.strpath |
| 389 | else: |
| 390 | s = str(s) |
| 391 | # Strip surrounding quotes if requested |
| 392 | if strip_quotes and len(s) >= 2 and " " in s and (s[0] == s[-1] == '"' or s[0] == s[-1] == "'"): |
| 393 | s = s[1:-1] |
| 394 | return s |
| 395 | |
| 396 | # Strip quotes from exe |
| 397 | result = [normalize(exe, strip_quotes=True)] |
| 398 | for arg in args: |
| 399 | # Don't strip quotes on anything except the exe |
| 400 | result.append(normalize(arg, strip_quotes=False)) |
| 401 | return result |
| 402 | |
| 403 | def spawn_debuggee(self, args, cwd=None, exe=sys.executable, setup=None): |
| 404 | assert self.debuggee is None |
no test coverage detected