Skip to content

Commit

Permalink
Correct hard coded paths in tests (#81)
Browse files Browse the repository at this point in the history
Fixes: #76 and #74
  • Loading branch information
retr0h authored Mar 14, 2020
1 parent 7c1dc9c commit 2b47606
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,20 @@ def test_copy_raises(temp_dir):


def test_build_sh_cmd_simple_command():
ls = sh.ls.bake()
cmd = util.build_sh_cmd("ls")
assert b"/bin/ls" == cmd._path
assert ls == cmd._path.decode()


def test_build_sh_cmd_command_with_args():
ls = sh.ls.bake()
cmd = util.build_sh_cmd("ls /tmp")
assert b"/bin/ls" == cmd._path
assert ls == cmd._path.decode()
assert [b"/tmp"] == cmd._partial_baked_args


def test_build_sh_cmd_command_with_cwd(temp_dir):
ls = sh.ls.bake()
cmd = util.build_sh_cmd("ls", cwd=temp_dir)
assert b"/bin/ls" == cmd._path
assert ls == cmd._path.decode()
assert temp_dir == cmd._partial_call_args["cwd"]

0 comments on commit 2b47606

Please sign in to comment.