This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch release-2.1
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/release-2.1 by this push:
new ca2017fbce [python] Keep build information tests valid across versions
ca2017fbce is described below
commit ca2017fbce23abc7055ab5e84a6f63163492f76c
Author: JingsongLi <[email protected]>
AuthorDate: Fri Sep 11 12:05:31 2026 +0800
[python] Keep build information tests valid across versions
---
paimon-python/pypaimon/tests/build_info_test.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/paimon-python/pypaimon/tests/build_info_test.py
b/paimon-python/pypaimon/tests/build_info_test.py
index c1d7d1e385..a3dc11627e 100644
--- a/paimon-python/pypaimon/tests/build_info_test.py
+++ b/paimon-python/pypaimon/tests/build_info_test.py
@@ -16,6 +16,7 @@
# under the License.
import os
+import re
import shutil
import subprocess
import sys
@@ -32,7 +33,8 @@ class BuildInfoTest(unittest.TestCase):
def test_full_version(self):
self.assertRegex(
build_info.full_version(),
- r"^python-2\.1\.dev-(UNKNOWN|[0-9a-f]{40})$",
+ r"^python-{}-(UNKNOWN|[0-9a-f]{{40}})$".format(
+ re.escape(build_info._source_version())),
)
def test_embedded_full_version(self):
@@ -104,7 +106,10 @@ class BuildInfoTest(unittest.TestCase):
embedded_file = os.path.join(extracted, "pypaimon",
"_full_version")
with open(embedded_file, "r") as full_version_file:
embedded = full_version_file.read().strip()
- self.assertEqual("python-2.1.dev-" + upstream_commit, embedded)
+ self.assertEqual(
+ "python-{}-{}".format(build_info._source_version(),
upstream_commit),
+ embedded,
+ )
downstream_commit = self._init_git_repository(extracted,
"downstream")
self.assertNotEqual(upstream_commit, downstream_commit)