Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
assert get_version("dunamai", first_choice=lambda: Version("1")) == Version("1")
def test__get_version__from_name() -> None:
assert get_version("dunamai") == Version(pkg_resources.get_distribution("dunamai").version)
def test__get_version__third_choice() -> None:
assert get_version("dunamai_nonexistent_test", third_choice=lambda: Version("3")) == Version(
"3"
)
def test__get_version__fallback() -> None:
assert get_version("dunamai_nonexistent_test") == Version("0.0.0")