Exemplo n.º 1
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",))
Exemplo n.º 2
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")
Exemplo n.º 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", ))
Exemplo n.º 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")
Exemplo n.º 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",)))
Exemplo n.º 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"))