def test_add_tag(tmpdir): # noqa project = "my_project" struct = {project: {"my_file": "Some other content", "my_dir": {"my_file": "Some more content"}}} structure.create_structure(struct) repo.init_commit_repo(project, struct) repo.add_tag(project, "v0.0") repo.add_tag(project, "v0.1", "Message with whitespace")
def test_git_repo_with_1_0_tag(tmpfolder): create_demoapp() add_tag('demoapp', 'v1.0', 'final release') with installed_demoapp('install'), chdir('demoapp'): out = next(setup_py('--version')) exp = '1.0' check_version(out, exp, dirty=False)
def test_git_repo_with_1_0_tag(tmpdir): # noqa create_demoapp() add_tag('demoapp', 'v1.0', 'final release') build_demoapp('install') with chdir('demoapp'): out = list(setup_py('version'))[-1] exp = '1.0' check_version(out, exp, dirty=False)
def test_git_repo_with_1_0_tag_dirty(tmpdir): # noqa create_demoapp() add_tag('demoapp', 'v1.0', 'final release') make_dirty_tree() with installed_demoapp('install'), chdir('demoapp'): out = next(setup_py('--version')) exp = '1.0' check_version(out, exp, dirty=True)
def test_sdist_install_with_1_0_tag(tmpdir): # noqa create_demoapp() add_tag('demoapp', 'v1.0', 'final release') build_demoapp('sdist') with installed_demoapp(): out = next(demoapp('--version')) exp = "1.0" check_version(out, exp, dirty=False)
def test_git_archive(tmpdir): # noqa create_demoapp() add_tag('demoapp', 'v1.0', 'final release') build_demoapp('git_archive') untar(os.path.join('demoapp', 'dist', 'demoapp.tar.gz')) with chdir('demoapp_unpacked'): out = list(setup_py('version'))[-1] exp = '1.0' check_version(out, exp, dirty=False)
def test_sdist_install_with_1_0_tag_dirty(tmpfolder): create_demoapp() add_tag('demoapp', 'v1.0', 'final release') make_dirty_tree() build_demoapp('sdist') with installed_demoapp() as demoapp: out = next(demoapp('--version')) exp = "1.0" check_version(out, exp, dirty=True)
def test_add_tag(tmpdir): # noqa project = "my_project" struct = {project: { "my_file": "Some other content", "my_dir": {"my_file": "Some more content"}} } structure.create_structure(struct) repo.init_commit_repo(project, struct) repo.add_tag(project, "v0.0") repo.add_tag(project, "v0.1", "Message with whitespace")
def test_add_tag(tmpfolder): project = "my_project" struct = { "my_file": "Some other content", "my_dir": {"my_file": "Some more content"}, } structure.create_structure(struct, dict(project_path=project)) repo.init_commit_repo(project, struct) repo.add_tag(project, "v0.0") repo.add_tag(project, "v0.1", "Message with whitespace")
def test_git_repo_dirty(tmpfolder): create_demoapp() add_tag('demoapp', 'v0.1', 'first tag') make_dirty_tree() make_commit() make_dirty_tree() with installed_demoapp('install'), chdir('demoapp'): out = next(setup_py('--version')) exp = '0.1.post0.dev1' check_version(out, exp, dirty=True)
def test_parentdir(tmpdir): # noqa create_demoapp() add_tag('demoapp', 'v1.0', 'final release') build_demoapp('sdist') path = os.path.join("demoapp", "dist", "demoapp*") untar(path) with chdir('demoapp-1.0'): out = list(setup_py('version'))[-1] exp = '1.0' check_version(out, exp, dirty=False)
def test_sdist_install_dirty(tmpfolder): create_demoapp() add_tag('demoapp', 'v0.1', 'first tag') make_dirty_tree() make_commit() make_dirty_tree() build_demoapp('sdist') with installed_demoapp() as demoapp: out = next(demoapp('--version')) exp = "0.1.post0.dev1" check_version(out, exp, dirty=True)