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