You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2025/07/02 13:44:45 UTC

(airflow) branch v3-0-test updated: [v3-0-test] chore(tests): move doc tests to task-sdk/tests/docs (#51876) (#52708)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-0-test by this push:
     new 68ba85b50c6 [v3-0-test] chore(tests): move doc tests to task-sdk/tests/docs (#51876) (#52708)
68ba85b50c6 is described below

commit 68ba85b50c6bf24e6e8ed8edcf9ac01d67f4a667
Author: Ankit Chaurasia <86...@users.noreply.github.com>
AuthorDate: Wed Jul 2 19:29:38 2025 +0545

    [v3-0-test] chore(tests): move doc tests to task-sdk/tests/docs (#51876) (#52708)
    
    (cherry picked from commit 8e15470d2aeab46af9a66f6a32df610ca6e518f9)
---
 task-sdk/tests/task_sdk/docs/__init__.py                 | 16 ++++++++++++++++
 .../tests/{ => task_sdk/docs}/test_docs_inventory.py     |  4 ++--
 task-sdk/tests/{ => task_sdk/docs}/test_public_api.py    |  0
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/task-sdk/tests/task_sdk/docs/__init__.py b/task-sdk/tests/task_sdk/docs/__init__.py
new file mode 100644
index 00000000000..13a83393a91
--- /dev/null
+++ b/task-sdk/tests/task_sdk/docs/__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/task-sdk/tests/test_docs_inventory.py b/task-sdk/tests/task_sdk/docs/test_docs_inventory.py
similarity index 96%
rename from task-sdk/tests/test_docs_inventory.py
rename to task-sdk/tests/task_sdk/docs/test_docs_inventory.py
index a1308031d52..eacbab7f4d7 100644
--- a/task-sdk/tests/test_docs_inventory.py
+++ b/task-sdk/tests/task_sdk/docs/test_docs_inventory.py
@@ -20,7 +20,7 @@ import sys
 from pathlib import Path
 
 # Add the SDK src directory to sys.path so that importlib loads our airflow.sdk module
-sys.path.insert(0, str(Path(__file__).parent.parent / "src"))
+sys.path.insert(0, str(Path(__file__).parents[3] / "src"))
 import importlib
 import shutil
 import subprocess
@@ -59,7 +59,7 @@ def test_docs_inventory_matches_public_api(tmp_path):
     """
     Build the HTML docs and compare the generated Sphinx inventory with the public API re-exports.
     """
-    docs_dir = Path(__file__).parent.parent / "docs"
+    docs_dir = Path(__file__).parents[3] / "docs"
     build_dir = tmp_path / "build"
     sphinx = shutil.which("sphinx-build")
     subprocess.run([sphinx, "-b", "html", "-q", str(docs_dir), str(build_dir)], check=True)
diff --git a/task-sdk/tests/test_public_api.py b/task-sdk/tests/task_sdk/docs/test_public_api.py
similarity index 100%
rename from task-sdk/tests/test_public_api.py
rename to task-sdk/tests/task_sdk/docs/test_public_api.py