def test_sh_exec1(self, mocked_chdir):
"""Test sh exec with cd, user home and shell variable"""
self.pymp.locals['path'] = "~/${RUNTIME}/location"
with patch.dict(pythonrc.os.environ, {'RUNTIME': 'dummy',
'HOME': '/home/me/'}):
self.pymp.process_sh_cmd('cd {path}')
mocked_chdir.assert_called_once_with('/home/me/dummy/location')
评论列表
文章目录