Exemplo n.º 1
0
def test_path_is_dir():
    assert which(os.getcwd()) is None
Exemplo n.º 2
0
def test_abs_path_is_executable():
    python = which("python")
    assert python == which(python)
Exemplo n.º 3
0
def test_not_in_path():
    assert which("does-not-exist") is None
Exemplo n.º 4
0
def test_relative_path_is_executable():
    assert isinstance(which("python"), str)
    assert os.path.isabs(which("python"))
Exemplo n.º 5
0
def test_not_in_path():
    assert_is_none(which('does-not-exist'))
Exemplo n.º 6
0
def test_abs_path_is_executable():
    python = which('python')
    assert_equal(python, which(python))
Exemplo n.º 7
0
def test_relative_path_is_executable():
    assert_is_instance(which('python'), str)
    assert_true(os.path.isabs(which('python')))
Exemplo n.º 8
0
def test_path_is_dir():
    assert_is_none(which(os.getcwd()))