Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

test_release_cleanup fails if pytest has just been run #548

@berland

Description

@berland

In a shell, running:
$ git clean -xfd . ; pytest tests; pytest tests/test_release_cleanup.py
will fail with

/data/projects/komodo/komodo/release_cleanup.py:228: in main
    args.func(args, parser)
/data/projects/komodo/komodo/release_cleanup.py:168: in run_cleanup
    check_missing_versions(used_versions, repository)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

used_versions = {'lib1': ['0.1.2', '1.2.3', '1.2.4', '1.2.4+builtin', '1.2.6+builtin'], 'lib2': ['1.2.3', '2.3.4', '2.3.4', '2.3.4', '2.3.6'], 'lib3': ['2.3.4', '3.4.5', '3.4.6', '3.4.6', '5.4.0'], 'lib4': ['3.4.5', '4.0.0']}
repository = {'lib1': {'1.2.4+builtin': {'source': 'pypi', 'make': 'sh'}, '0.1.2+builtin': {'source': 'pypi', 'make': 'sh'}, '1.2.3...ib4': {'3.4.5': {'make': 'pip', 'depends': ['lib3', 'lib2']}}, 'lib5': {'1.2.3': {'make': 'pip', 'depends': ['lib4']}}}

    def check_missing_versions(used_versions, repository):
        unused_versions = {}
        for lib, versions in used_versions.items():
            for version in versions:
                if lib not in repository or version not in repository[lib]:
>                   raise ValueError(f"Missing used version {lib}=={version}")
E                   ValueError: Missing used version lib1==1.2.6+builtin

/data/projects/komodo/komodo/release_cleanup.py:43: ValueError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions