MCPcopy Index your code
hub / github.com/github/spec-kit / _python_run

Method _python_run

tests/test_workflows.py:1145–1153  ·  view source on GitHub ↗

A portable shell ``run`` that executes ``body`` with the current interpreter, avoiding non-portable shell quoting (e.g. Windows ``cmd.exe`` keeping single quotes) in the output_format tests.

(tmp_path, body)

Source from the content-addressed store, hash-verified

1143
1144 @staticmethod
1145 def _python_run(tmp_path, body):
1146 """A portable shell ``run`` that executes ``body`` with the current
1147 interpreter, avoiding non-portable shell quoting (e.g. Windows
1148 ``cmd.exe`` keeping single quotes) in the output_format tests."""
1149 import sys
1150
1151 script = tmp_path / "emit.py"
1152 script.write_text(body, encoding="utf-8")
1153 return f'"{sys.executable}" "{script}"'
1154
1155 def test_execute_echo(self):
1156 from specify_cli.workflows.steps.shell import ShellStep

Calls

no outgoing calls

Tested by

no test coverage detected