Пример #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",))
Пример #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")
Пример #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"))