Пример #1
0
def test_ExpandConfigPath_path_prefix():
    assert (corpuses.ExpandConfigPath(
        'foo/bar', path_prefix='/tmp/') == pathlib.Path('/tmp/foo/bar'))
Пример #2
0
def test_ExpandConfigPath_tilde_expansion():
    assert (corpuses.ExpandConfigPath('~/foo') == pathlib.Path(
        '~/foo').expanduser())
Пример #3
0
def test_ExpandConfigPath_pwd_var_expansion():
    assert corpuses.ExpandConfigPath('$PWD/') == pathlib.Path(os.getcwd())
Пример #4
0
def test_ExpandConfigPath_home_var_expansion():
    assert (corpuses.ExpandConfigPath('$HOME/foo') == pathlib.Path(
        '~/foo').expanduser())
Пример #5
0
def test_ExpandConfigPath_path_prefix():
    assert corpuses.ExpandConfigPath(
        "foo/bar", path_prefix="/tmp/") == pathlib.Path("/tmp/foo/bar")