File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import sys
77from unittest import mock
88
9- import semantic_version
9+ import re
10+ import tomllib
11+
1012from ddt import data , ddt
1113from django .conf import settings
1214from django .core import mail
@@ -152,9 +154,11 @@ def test_opensearch_index_pr_build(self):
152154 settings_vars = self .reload_settings ()
153155 assert settings_vars ['OPENSEARCH_INDEX' ] == index_name
154156
155- @staticmethod
156- def test_semantic_version ():
157- """
158- Verify that we have a semantic compatible version.
159- """
160- semantic_version .Version (settings .VERSION )
157+ def test_bump_my_version_format (self ):
158+ """Verify that VERSION matches the bump-my-version calver format."""
159+ with open ("pyproject.toml" , "rb" ) as f : # noqa: PTH123
160+ pyproject = tomllib .load (f )
161+ version_pattern = pyproject ["tool" ]["bumpversion" ]["parse" ]
162+ package_version = pyproject ["project" ]["version" ]
163+ assert settings .VERSION == package_version
164+ assert re .fullmatch (version_pattern , settings .VERSION )
You can’t perform that action at this time.
0 commit comments