Exemplo n.º 1
0
def handle_copy(template_dirs, copy_config):
    # expanding function is added so that
    # copy function understands repo and pypi_pkg path, since 0.3.1
    expanded_dirs = list(plugins.expand_template_directories(template_dirs))

    copier = Copier(expanded_dirs)
    copier.copy_files(copy_config)
    copier.report()
    return copier.number_of_copied_files()
Exemplo n.º 2
0
def test_expand_pypi_dir():
    dirs = list(expand_template_directories("testmobans:template-tests"))
    for directory in dirs:
        assert os.path.exists(directory)
Exemplo n.º 3
0
def test_expand_repo_dir(_, __):
    dirs = list(expand_template_directories("git_repo:template"))

    expected = [os.path.join(USER_HOME, "git_repo", "template")]
    eq_(expected, dirs)
Exemplo n.º 4
0
def test_expand_repo_dir(_, __):
    dirs = list(expand_template_directories("git_repo:template"))

    expected = ["/user/home/.moban/repos/git_repo/template"]
    eq_(expected, dirs)