コード例 #1
0
ファイル: test_emu.py プロジェクト: ChrisCummins/emu
def test_which_path():
  assert "/bin/bash" == emu.which("bash", path=("/usr", "/bin"))
  assert None == emu.which("ls", path=("/dev",))
  assert None == emu.which("ls", path=("/not-a-real-path",))
  assert None == emu.which("not-a-real-command", path=("/bin",))
コード例 #2
0
ファイル: test_emu.py プロジェクト: ChrisCummins/emu
def test_which():
  assert "/bin/bash" == emu.which("bash")
  assert "/bin/bash" == emu.which("/bin/bash")
  assert None == emu.which("not-a-real-command")
コード例 #3
0
def test_which_path():
    assert "/bin/bash" == emu.which("bash", path=("/usr", "/bin"))
    assert None == emu.which("ls", path=("/dev", ))
    assert None == emu.which("ls", path=("/not-a-real-path", ))
    assert None == emu.which("not-a-real-command", path=("/bin", ))
コード例 #4
0
def test_which():
    assert "/bin/bash" == emu.which("bash")
    assert "/bin/bash" == emu.which("/bin/bash")
    assert None == emu.which("not-a-real-command")
コード例 #5
0
 def test_which_path(self):
     self._test("/bin/ls", emu.which("ls", path=("/usr", "/bin")))
     self._test(None, emu.which("ls", path=("/dev",)))
     self._test(None, emu.which("ls", path=("/not-a-real-path",)))
     self._test(None, emu.which("not-a-real-command", path=("/bin",)))
コード例 #6
0
 def test_which(self):
     self._test("/bin/ls", emu.which("ls"))
     self._test("/bin/ls", emu.which("/bin/ls"))
     self._test(None, emu.which("not-a-real-command"))