Skip to content

Commit 198a733

Browse files
author
Vladimir Kotal
committed
test env
1 parent 1de2337 commit 198a733

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/sync/test/test_command.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ def test_work_dir(self):
5252
cmd.execute()
5353
self.assertEqual(orig_cwd, os.getcwd())
5454

55+
@unittest.skipUnless(os.name.startswith("posix"), "requires Unix")
56+
def test_env(self):
57+
cmd = Command(['/usr/bin/env'],
58+
env_vars={'FOO': 'BAR'})
59+
cmd.execute()
60+
self.assertTrue("FOO=BAR\n" in cmd.getoutput())
61+
5562
@unittest.skipUnless(os.name.startswith("posix"), "requires Unix")
5663
def test_retcode(self):
5764
cmd = Command(["/bin/false"])

0 commit comments

Comments
 (0)