This is an automated email from the ASF dual-hosted git repository.
mchades pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/branch-1.3 by this push:
new d2981ddef4 [Cherry-pick to branch-1.3] [MINOR] test(client-python):
Fix API unit test discovery (#12041) (#12054)
d2981ddef4 is described below
commit d2981ddef47edecec8278046d920deee7de59066
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jul 17 21:44:18 2026 +0800
[Cherry-pick to branch-1.3] [MINOR] test(client-python): Fix API unit test
discovery (#12041) (#12054)
**Cherry-pick Information:**
- Original commit: 58636323726cc519e6a7127ec0ae324025b9ae05
- Target branch: `branch-1.3`
- Status: ✅ Clean cherry-pick (no conflicts)
Co-authored-by: Zhiguo Wu <[email protected]>
---
clients/client-python/tests/unittests/api/__init__.py | 16 ++++++++++++++++
.../unittests/api/stats/test_supports_statistics.py | 9 +++++----
.../client-python/tests/unittests/api/tag/__init__.py | 16 ++++++++++++++++
3 files changed, 37 insertions(+), 4 deletions(-)
diff --git a/clients/client-python/tests/unittests/api/__init__.py
b/clients/client-python/tests/unittests/api/__init__.py
new file mode 100644
index 0000000000..13a83393a9
--- /dev/null
+++ b/clients/client-python/tests/unittests/api/__init__.py
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
diff --git
a/clients/client-python/tests/unittests/api/stats/test_supports_statistics.py
b/clients/client-python/tests/unittests/api/stats/test_supports_statistics.py
index 1dd731088b..7f402d4419 100644
---
a/clients/client-python/tests/unittests/api/stats/test_supports_statistics.py
+++
b/clients/client-python/tests/unittests/api/stats/test_supports_statistics.py
@@ -41,8 +41,11 @@ class TestSupportsStatistics(unittest.TestCase):
"""Test that a concrete implementation can be created."""
class ConcreteStatisticValue(StatisticValue[int]):
+ def __init__(self, value: int = 50):
+ self._value = value
+
def value(self) -> int:
- return 50
+ return self._value
def data_type(self) -> Types.IntegerType:
return Types.IntegerType.get()
@@ -69,9 +72,7 @@ class TestSupportsStatistics(unittest.TestCase):
return self._name
def value(self) -> StatisticValue[int] | None:
- val = ConcreteStatisticValue()
- val._val = self._value # pylint: disable=protected-access
- return val
+ return ConcreteStatisticValue(self._value)
def reserved(self) -> bool:
return False
diff --git a/clients/client-python/tests/unittests/api/tag/__init__.py
b/clients/client-python/tests/unittests/api/tag/__init__.py
new file mode 100644
index 0000000000..13a83393a9
--- /dev/null
+++ b/clients/client-python/tests/unittests/api/tag/__init__.py
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.