Exemplo n.º 1
0
def test_expand_paths_vars(monkeypatch):
    test_path = '/test/path'
    monkeypatch.setenv('TEST_PATH', test_path)
    assert utils.expand_paths_vars(['~']) == [os.path.expanduser('~')]
    assert utils.expand_paths_vars(['$TEST_PATH']) == [test_path]
Exemplo n.º 2
0
def test_expand_paths_vars(monkeypatch):
    """Ensure that tilde and env vars are expanded in paths lists."""
    test_path = '/test/path'
    monkeypatch.setenv('TEST_PATH', test_path)
    assert utils.expand_paths_vars(['~']) == [os.path.expanduser('~')]
    assert utils.expand_paths_vars(['$TEST_PATH']) == [test_path]
Exemplo n.º 3
0
def test_expand_paths_vars(test_path, expected, monkeypatch):
    """Ensure that tilde and env vars are expanded in paths lists."""
    monkeypatch.setenv('TEST_PATH', '/test/path')
    assert utils.expand_paths_vars([test_path]) == [expected]