Skip to content

Commit 46102d3

Browse files
committed
fix test_run_shell_cmd_env after changes to env.sh to make unsetting of environment more robust
1 parent ee9f6ce commit 46102d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/framework/run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ def test_run_shell_cmd_env(self):
294294
env_script = os.path.join(cmd_tmpdir, 'env.sh')
295295
self.assertExists(env_script)
296296
env_script_txt = read_file(env_script)
297-
self.assertTrue(env_script_txt.startswith('unset -f $('))
297+
self.assertIn('unset "$var"', env_script_txt)
298+
self.assertIn('unset -f "$func"', env_script_txt)
298299
self.assertIn('\nexport FOOBAR=foobar\nexport PATH', env_script_txt)
299300

300301
cmd_script = os.path.join(cmd_tmpdir, 'cmd.sh')

0 commit comments

Comments
 (0)