예제 #1
0
def test_project(inputs, mkdir):
    mkdir.return_value = 0
    inputs.return_value = dict(project_name='test-me')
    yehua_file = get_yehua_file()
    project = Project(yehua_file)
    project.create_all_directories()
    calls = mkdir.call_args_list
    calls = [str(call) for call in calls]
    expected = [
        "call('test-me')", "call('test-me/test_me')", "call('test-me/tests')",
        "call('test-me/docs')", "call('test-me/docs/source')",
        "call('test-me/.moban.d')", "call('test-me/.moban.d/tests')",
        "call('test-me/.moban.d/docs')", "call('test-me/.moban.d/docs/source')"
    ]
    eq_(calls, expected)
예제 #2
0
파일: main.py 프로젝트: jayvdb/yehua
def main():
    argument = None
    yehua_file = None
    if len(sys.argv) == 2:
        argument = sys.argv[1]
        if argument == "help":
            usage()
        else:
            yehua_file = argument
    else:
        yehua_file = get_yehua_file()
    project = Project(yehua_file)
    project.create_all_directories()
    project.templating()
    project.copy_static_files()
예제 #3
0
파일: main.py 프로젝트: jayvdb/yehua
def main():
    argument = None
    yehua_file = None
    if len(sys.argv) == 2:
        argument = sys.argv[1]
        if argument == "help":
            usage()
        else:
            yehua_file = argument
    else:
        yehua_file = get_yehua_file()
    project = Project(yehua_file)
    project.create_all_directories()
    project.templating()
    project.copy_static_files()
예제 #4
0
def test_project(inputs, mkdir):
    mkdir.return_value = 0
    inputs.return_value = dict(
        project_name='test-me'
    )
    yehua_file = get_yehua_file()
    project = Project(yehua_file)
    project.create_all_directories()
    calls = mkdir.call_args_list
    calls = [str(call) for call in calls]
    expected = [
        "call('test-me')",
        "call('test-me/test_me')",
        "call('test-me/tests')",
        "call('test-me/docs')",
        "call('test-me/docs/source')",
        "call('test-me/.moban.d')",
        "call('test-me/.moban.d/tests')",
        "call('test-me/.moban.d/docs')",
        "call('test-me/.moban.d/docs/source')"
    ]
    eq_(calls, expected)
예제 #5
0
def test_existing_directory(inputs, mkdir):
    mkdir.return_value = 0
    inputs.return_value = dict(project_name="yehua")
    yehua_file = get_yehua_file()
    project = Project(yehua_file)
    project.create_all_directories()