Exemple #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",))
Exemple #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")
Exemple #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", ))
Exemple #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")
Exemple #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",)))
Exemple #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"))