Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ build-backend = "setuptools.build_meta"
[tool.setuptools.package-dir]
"pg_probackup2" = "src"

[tool.setuptools.dynamic]
version = {attr = "pg_probackup2.__version__"}

[tool.flake8]
extend-ignore = ["E501"]
exclude = [".git", "__pycache__", "env", "venv"]
Expand All @@ -17,7 +20,7 @@ log_file_date_format = "%Y-%m-%d %H:%M:%S"

[project]
name = "testgres_pg_probackup2"
version = "0.10.0"
dynamic = ["version"]
description = "Plugin for testgres that manages pg_probackup2"
readme = "README.md"
requires-python = ">=3.7.3"
Expand Down
1 change: 1 addition & 0 deletions src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.10.0"
17 changes: 17 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from src import __version__ as pg_probackup2_version

from packaging.version import Version


class TestCommon:
def test_pg_probackup2_version(self):
assert type(pg_probackup2_version) is str

v = Version(pg_probackup2_version)

assert v.major == 0
assert v.minor == 10
assert v.micro == 0

assert str(v) == pg_probackup2_version
return
Loading