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)
| 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 |
no outgoing calls
no test coverage detected