def testCwdWithRelativeScriptPath(self, isdirMock, existsMock, accessMock,
subprocessMock):
"""
If a step has a cwd set and its script is a relative path, the path of
the executed script that is executed must be as specified (not
converted to an absolute path).
"""
subprocessMock.return_value = ''
sp = SlurmPipeline(
{
'steps': [
{
'cwd': '/tmp',
'name': 'name1',
'script': 'script1',
},
],
})
sp.schedule()
subprocessMock.assert_has_calls([
call(['script1'], cwd='/tmp', universal_newlines=True,
stdin=DEVNULL, env=ANY),
])
评论列表
文章目录