Exemple #1
0
def main():
    cfg_files = (
        # first look in current dir
        os.path.join(os.getcwd(), ".vamosrc"),
        # then in home dir
        os.path.expanduser("~/.vamosrc"),
    )
    tools = [PathTool()]
    sys.exit(tools_main(tools, cfg_files))
Exemple #2
0
def main(args=None):
    cfg_files = (
        # first look in current dir
        os.path.join(os.getcwd(), ".vamosrc"),
        # then in home dir
        os.path.expanduser("~/.vamosrc"),
    )
    tools = [PathTool()]
    return tools_main(tools, cfg_files, args)
Exemple #3
0
def tools_path_simple_test(capsys, tmpdir):
    tools = [PathTool()]
    cwd = os.getcwd()
    cfg_dict = {
        "volumes": ["cwd:" + cwd],
        "path": {
            "vols_base_dir": str(tmpdir)
        }
    }
    res = tools_main(tools, args=["sys2ami", "tmp"], cfg_dict=cfg_dict)
    assert res == 0
    captured = capsys.readouterr()
    assert captured.out.splitlines() == ["cwd:tmp"]