コード例 #1
0
ファイル: test_projects.py プロジェクト: derdon/swsg
def test_remove_project(temp_project):
    assert not temp_project.exists
    py.test.raises(
        NonexistingProject,
        'remove_project('
        '   temp_project.project_dir,'
        '   temp_project.projects_file_name)')
    temp_project.init()
    assert temp_project.exists
    remove_project(temp_project.project_dir, temp_project.projects_file_name)
    assert not temp_project.exists
コード例 #2
0
ファイル: cli.py プロジェクト: derdon/swsg
def remove_project_(args):
    full_path = path.abspath(args.path)
    try:
        remove_project(full_path)
    except NonexistingProject, e:
        print(e, file=sys.stderr)