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"))
Beispiel #5
0
def test_not_in_path():
    assert_is_none(which('does-not-exist'))
Beispiel #6
0
def test_abs_path_is_executable():
    python = which('python')
    assert_equal(python, which(python))
Beispiel #7
0
def test_relative_path_is_executable():
    assert_is_instance(which('python'), str)
    assert_true(os.path.isabs(which('python')))
Beispiel #8
0
def test_path_is_dir():
    assert_is_none(which(os.getcwd()))