Skip to content

How to ensure __version__ global variable is not 0.0.0 when imported (discussion) #20

@bobleesj

Description

@bobleesj

Since we had a __version__ global variable set to 0.0.0 that was not detected by our CI system, how about we create a simple test function to address this?

The function would look like this:

def test_package_version():
    """Ensure the package version is defined and not set to the initial placeholder."""
    assert hasattr(diffpy.utils, '__version__'), "The package version is not defined."
    assert diffpy.utils.__version__ != "0.0.0"

@sbillinge

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions