This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new f5e76d1025e [v3-1-test] Fix the `__init__.py` for tests (#58211)
(#58213)
f5e76d1025e is described below
commit f5e76d1025e52ae48546933e8c9714cdc2de20da
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Mon Dec 1 17:34:11 2025 +0100
[v3-1-test] Fix the `__init__.py` for tests (#58211) (#58213)
The `__init__.py` for tests should have the legacy namespaces
defined in order for IDE imports to work properly. This works also
in IDEs where `tests` folders are added the path of ours (this
is done via `setup_idea.py` and `setup_vscode.py`).
There was a bug in our prek hook wher it did not have "expected"
and "namespace" __init__.py for those known test folders.
This PR fixes the prek hook and some of the recently added
folders that had wrong __init__.py added.
(cherry picked from commit 80c2ccc0b435dca10ba0e44b160e2eff6f8d4f5a)
Co-authored-by: Jarek Potiuk <[email protected]>
---
.../{tinkerpop/tests/integration => impala/tests/system}/__init__.py | 1 +
providers/apache/tinkerpop/tests/integration/__init__.py | 1 +
providers/apache/tinkerpop/tests/system/__init__.py | 1 +
providers/exasol/tests/system/__init__.py | 1 +
providers/git/tests/unit/__init__.py | 1 +
5 files changed, 5 insertions(+)
diff --git a/providers/apache/tinkerpop/tests/integration/__init__.py
b/providers/apache/impala/tests/system/__init__.py
similarity index 92%
copy from providers/apache/tinkerpop/tests/integration/__init__.py
copy to providers/apache/impala/tests/system/__init__.py
index 13a83393a91..5966d6b1d52 100644
--- a/providers/apache/tinkerpop/tests/integration/__init__.py
+++ b/providers/apache/impala/tests/system/__init__.py
@@ -14,3 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+__path__ = __import__("pkgutil").extend_path(__path__, __name__)
diff --git a/providers/apache/tinkerpop/tests/integration/__init__.py
b/providers/apache/tinkerpop/tests/integration/__init__.py
index 13a83393a91..5966d6b1d52 100644
--- a/providers/apache/tinkerpop/tests/integration/__init__.py
+++ b/providers/apache/tinkerpop/tests/integration/__init__.py
@@ -14,3 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+__path__ = __import__("pkgutil").extend_path(__path__, __name__)
diff --git a/providers/apache/tinkerpop/tests/system/__init__.py
b/providers/apache/tinkerpop/tests/system/__init__.py
index 13a83393a91..5966d6b1d52 100644
--- a/providers/apache/tinkerpop/tests/system/__init__.py
+++ b/providers/apache/tinkerpop/tests/system/__init__.py
@@ -14,3 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+__path__ = __import__("pkgutil").extend_path(__path__, __name__)
diff --git a/providers/exasol/tests/system/__init__.py
b/providers/exasol/tests/system/__init__.py
index 13a83393a91..5966d6b1d52 100644
--- a/providers/exasol/tests/system/__init__.py
+++ b/providers/exasol/tests/system/__init__.py
@@ -14,3 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+__path__ = __import__("pkgutil").extend_path(__path__, __name__)
diff --git a/providers/git/tests/unit/__init__.py
b/providers/git/tests/unit/__init__.py
index 13a83393a91..5966d6b1d52 100644
--- a/providers/git/tests/unit/__init__.py
+++ b/providers/git/tests/unit/__init__.py
@@ -14,3 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+__path__ = __import__("pkgutil").extend_path(__path__, __name__)