Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix versioning bug with dev #120

Open
pluflou opened this issue Nov 1, 2024 · 0 comments
Open

fix versioning bug with dev #120

pluflou opened this issue Nov 1, 2024 · 0 comments
Assignees

Comments

@pluflou
Copy link
Collaborator

pluflou commented Nov 1, 2024

In a local dev environment, the version gets incremented and one of the tests fails when trying to check for the version, likely due to commit status and versions being out of sync with the metadata:


    def test_cli_main():
        command = ["badger"]
        out, err, exitcode = capture(command)
    
        assert exitcode == 0
    
        # Check output lines
        outlines = out.splitlines()
        assert len(outlines) == 6
    
        # Check name
        assert outlines[0] == "name: Badger the optimizer"
    
        # Check version
        version = metadata.version("badger-opt")
        try:  # yaml encoding number-like string differently
>           _ = float(version)
E           ValueError: could not convert string to float: '1.1.5.dev20+gce8b344'

tests/test_cli_basic.py:29: ValueError

During handling of the above exception, another exception occurred:

    def test_cli_main():
        command = ["badger"]
        out, err, exitcode = capture(command)
    
        assert exitcode == 0
    
        # Check output lines
        outlines = out.splitlines()
        assert len(outlines) == 6
    
        # Check name
        assert outlines[0] == "name: Badger the optimizer"
    
        # Check version
        version = metadata.version("badger-opt")
        try:  # yaml encoding number-like string differently
            _ = float(version)
            assert outlines[1] == f"version: '{version}'"
        except ValueError:
>           assert outlines[1] == f"version: {version}"
E           AssertionError: assert 'version: 1.1...ev17+g0263f07' == 'version: 1.1...ev20+gce8b344'
E             
E             - version: 1.1.5.dev20+gce8b344
E             + version: 1.1.5.dev17+g0263f07

tests/test_cli_basic.py:32: AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant