Example #1
0
    def test_changelog_update_with_tag(self, tmpdir):
        proj_info = create_project(tmpdir, tag_and_commit=True)
        self.run_release(tmpdir)

        release.status(tmpdir.strpath)
        changelog_contents = tmpdir.join('changelog.rst').read()
        expected_changelog = '''
Changelog
=========

1.2 released 2017-01-02
-----------------------

- add d ({0.direct_commit_hash}_)

.. _{0.direct_commit_hash}: http://some.thing/commit/{0.direct_commit_hash}


1.0 released in the past
------------------------

- some stuff
'''.lstrip().format(proj_info)

        assert expected_changelog == changelog_contents
Example #2
0
    def test_empty_setuppy(self, tmpdir):
        create_project(tmpdir, setuppy_empty=True)

        with pytest.raises(release.Error) as excinfo:
            release.status(tmpdir.strpath)

        msg = excinfo.value.args[0]
        assert msg == 'Could not get name, url, and version from setup.py.  Got: '
Example #3
0
    def test_ok(self, tmpdir):
        create_project(tmpdir)

        project = release.status(tmpdir.strpath)

        assert project.name == 'SomeThing'
        assert project.url == 'http://some.thing/'
        assert project.version == '1.1'
Example #4
0
File: cli.py Project: level12/pyp
def status(ctx, repo_dpath):
    """
        Show project status (run 1st)
    """
    try:
        releaselib.verify(repo_dpath)
        status = releaselib.status(repo_dpath)
    except releaselib.Error as e:
        ctx.fail(str(e))

    click.echo('Name: {}'.format(status.name))
    click.echo('URL: {}'.format(status.url))
    click.echo('Version: {}'.format(status.version))
Example #5
0
    def test_version_update(self, tmpdir):
        create_project(tmpdir)
        self.run_release(tmpdir)

        project = release.status(tmpdir.strpath)
        assert project.version == '1.2'