Add __version__ attribute to package
This commit is contained in:
13
tests/test_version.py
Normal file
13
tests/test_version.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from betterproto import __version__
|
||||
from pathlib import Path
|
||||
import toml
|
||||
|
||||
PROJECT_TOML = Path(__file__).joinpath("..", "..", "pyproject.toml").resolve()
|
||||
|
||||
|
||||
def test_version():
|
||||
with PROJECT_TOML.open() as toml_file:
|
||||
project_config = toml.load(toml_file)
|
||||
assert (
|
||||
__version__ == project_config["tool"]["poetry"]["version"]
|
||||
), "Project version should match in package and package config"
|
Reference in New Issue
Block a user