How to use the dunamai.get_version function in dunamai

To help you get started, we’ve selected a few dunamai examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mtkennerly / dunamai / tests / unit / test_dunamai.py View on Github external
    assert get_version("dunamai", first_choice=lambda: Version("1")) == Version("1")
github mtkennerly / dunamai / tests / unit / test_dunamai.py View on Github external
def test__get_version__from_name() -> None:
    assert get_version("dunamai") == Version(pkg_resources.get_distribution("dunamai").version)
github mtkennerly / dunamai / tests / unit / test_dunamai.py View on Github external
def test__get_version__third_choice() -> None:
    assert get_version("dunamai_nonexistent_test", third_choice=lambda: Version("3")) == Version(
        "3"
    )
github mtkennerly / dunamai / tests / unit / test_dunamai.py View on Github external
def test__get_version__fallback() -> None:
    assert get_version("dunamai_nonexistent_test") == Version("0.0.0")