From 2b47606b11355302305c53e1a12fc05dd034a265 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=AFo=D0=BD=D0=B8=D0=B8=CE=B3=20=C4=AFo=D0=BD=D0=B8?= =?UTF-8?q?=D0=B8=CE=B3?= Date: Sat, 14 Mar 2020 13:28:21 -0700 Subject: [PATCH] Correct hard coded paths in tests (#81) Fixes: #76 and #74 --- test/test_util.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test_util.py b/test/test_util.py index 7116752..200c1e1 100644 --- a/test/test_util.py +++ b/test/test_util.py @@ -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"]