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 0000000000000..13a83393a9124 --- /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 a1308031d524f..eacbab7f4d742 100644 --- a/task-sdk/tests/test_docs_inventory.py +++ b/task-sdk/tests/task_sdk/docs/test_docs_inventory.py @@ -20,7 +20,7 @@ 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