You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2026/09/11 04:05:49 UTC
(paimon) 01/02: [python] Keep build information tests valid across versions
This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
commit d7e76bebabc21c4ad2e63c52a91b71d33a4b4441
Author: JingsongLi <ji...@gmail.com>
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)