def test_path_is_dir(): assert which(os.getcwd()) is None
def test_abs_path_is_executable(): python = which("python") assert python == which(python)
def test_not_in_path(): assert which("does-not-exist") is None
def test_relative_path_is_executable(): assert isinstance(which("python"), str) assert os.path.isabs(which("python"))
def test_not_in_path(): assert_is_none(which('does-not-exist'))
def test_abs_path_is_executable(): python = which('python') assert_equal(python, which(python))
def test_relative_path_is_executable(): assert_is_instance(which('python'), str) assert_true(os.path.isabs(which('python')))
def test_path_is_dir(): assert_is_none(which(os.getcwd()))