PowerShellスクリプトtest_me.ps1
を実行しようとしていますが、3つの引数:-Name name
、-Age age
、-Place place
が必要です。PythonのPowerShellスクリプトが動作していない
input_data
私は私のpytestから渡しているものです。私は、出力を確認したい
try:
output = subprocess.call(
[
"powershell.exe",
"-Name" + input_data['name'],
"-Age" + input_data['age'],
"Place" + input_data['place']
], '&{. "./test_me.ps1"}')
except subprocess.CalledProcessError, e:
print "subprocess CalledProcessError.output = " + e.output
print output
:
は、ここに私のコードです。
あなたはどのような出力を期待しますか?何を手に入れますか?あなたがエラーをキャッチせず、潜在的にその一部を隠すなら、あなたは何を得ますか? –
PowerShellでtest_me.ps1を実行したときの出力は? – Mike