Skip to content

Tests fail in clean fork #21

Open
Open
@tfendin

Description

@tfendin

It seems like the tests test_git_tag and test_git_stable requires the tags from the git repo. When cloning a new fork the tags doesn't come along and thus the tests fail, see log below.

================================================================================== FAILURES ==================================================================================
________________________________________________________________________________ test_git_tag ________________________________________________________________________________

    @skipif_no_git
    def test_git_tag():
        '''Compare version numbers in main script and git tag'''
        skip_development_versions()
        app_version = read_version(BCPP, lines=5)
        command = 'git log -1 --format=%D --'.split() + [BCPP]
        output = run(command, stdout=PIPE)
        match = VERSION.search(output)
        if not match:
>           raise AssertionError('version pattern not found in {}'.format(' '.join(command)))
E           AssertionError: version pattern not found in git log -1 --format=%D -- bash_completion

tests/test_release.py:72: AssertionError
______________________________________________________________________________ test_git_stable _______________________________________________________________________________

    @skipif_no_git
    def test_git_stable():
        '''Check that git stable tag points to the latest CHANGELOG entry'''
        skip_development_versions()
>       stable = read_git_ref('stable')

tests/test_release.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_release.py:53: in read_git_ref
    return run(command, stdout=PIPE)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

command = ['git', 'show-ref', '-s', '--heads', '--tags', 'stable'], ka = {'stdout': -1}
process = <Popen: returncode: 1 args: ['git', 'show-ref', '-s', '--heads', '--tags', '...>, exit_code = 1, output = ''

    def run(command, **ka):
        '''Backwards compatible subprocess runner'''
        process = Popen(command, **ka)
        exit_code = process.wait()
        output = process.stdout.read().decode().strip()
        if exit_code:
>           raise RuntimeError('command returned {}: {}'.format(exit_code, ' '.join(command)))
E           RuntimeError: command returned 1: git show-ref -s --heads --tags stable

tests/test_release.py:33: RuntimeError
========================================================================== short test summary info ===========================================================================
FAILED tests/test_release.py::test_git_tag - AssertionError: version pattern not found in git log -1 --format=%D -- bash_completion
FAILED tests/test_release.py::test_git_stable - RuntimeError: command returned 1: git show-ref -s --heads --tags stable
================================================================== 2 failed, 33 passed, 2 skipped in 14.50s ==================================================================

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions