You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2025/06/01 16:50:02 UTC

(airflow) branch v3-0-test updated: [v3-0-test] Move example_dags in standard provider to example_dags in sources (#51260) (#51275)

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

potiuk 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 41f152b33fc [v3-0-test] Move example_dags in standard provider to example_dags in sources (#51260) (#51275)
41f152b33fc is described below

commit 41f152b33fce8e63acb390f21208cd02b657b9d6
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Jun 1 18:49:56 2025 +0200

    [v3-0-test] Move example_dags in standard provider to example_dags in sources (#51260) (#51275)
    
    Folow up after #51192.
    
    Actually choosing the same approach as for system tests was
    pretty wrong and even before attempting to have final solution
    for example_dags/system tests we should move the standard examples
    out of "tests.system" as rightfully pointed out by Jed in
    the #51192.
    
    The snippets of code to run the tests as pytests are not neeeded
    and they are actually even harmful as they cause import errors
    when no tests_common is around
    (cherry picked from commit cc29e027ce777452c214187e675eb247a6e231ad)
---
 airflow-core/docs/tutorial/taskflow.rst            |  6 ++--
 airflow-core/src/airflow/example_dags/standard     |  2 +-
 airflow-core/tests/unit/jobs/test_scheduler_job.py | 38 ++++++++++++--------
 devel-common/src/docs/provider_conf.py             | 10 +++---
 docs/spelling_wordlist.txt                         |  1 +
 providers/arangodb/docs/index.rst                  |  8 +----
 providers/edge3/docs/index.rst                     |  7 ++++
 .../providers/edge3/example_dags/win_notepad.py    |  2 +-
 providers/oracle/docs/index.rst                    |  2 +-
 providers/standard/docs/index.rst                  |  9 +----
 providers/standard/docs/operators/bash.rst         | 18 +++++-----
 providers/standard/docs/operators/datetime.rst     |  8 ++---
 providers/standard/docs/operators/latest_only.rst  |  2 +-
 providers/standard/docs/operators/python.rst       | 40 +++++++++++-----------
 .../standard/docs/operators/trigger_dag_run.rst    |  2 +-
 providers/standard/docs/sensors/bash.rst           |  2 +-
 providers/standard/docs/sensors/datetime.rst       |  8 ++---
 .../standard/docs/sensors/external_task_sensor.rst |  8 ++---
 providers/standard/docs/sensors/file.rst           |  4 +--
 providers/standard/docs/sensors/python.rst         |  4 +--
 .../providers/standard/example_dags}/__init__.py   |  0
 .../example_dags}/example_bash_decorator.py        |  6 ----
 .../example_dags}/example_bash_operator.py         |  6 ----
 .../example_branch_datetime_operator.py            |  8 -----
 .../example_branch_day_of_week_operator.py         |  6 ----
 .../example_dags}/example_branch_operator.py       |  6 ----
 .../example_branch_operator_decorator.py           |  6 ----
 .../example_external_task_child_deferrable.py      |  6 ----
 .../example_external_task_marker_dag.py            |  6 ----
 .../example_external_task_parent_deferrable.py     |  6 ----
 .../standard/example_dags}/example_latest_only.py  |  6 ----
 .../example_dags}/example_python_decorator.py      |  6 ----
 .../example_dags}/example_python_operator.py       |  6 ----
 .../example_dags}/example_sensor_decorator.py      |  6 ----
 .../standard/example_dags}/example_sensors.py      |  6 ----
 .../example_short_circuit_decorator.py             |  6 ----
 .../example_short_circuit_operator.py              |  6 ----
 .../example_trigger_controller_dag.py              |  6 ----
 .../standard/example_dags}/sql/__init__.py         |  0
 .../standard/example_dags}/sql/sample.sql          |  0
 providers/standard/tests/system/__init__.py        | 17 ---------
 41 files changed, 91 insertions(+), 211 deletions(-)

diff --git a/airflow-core/docs/tutorial/taskflow.rst b/airflow-core/docs/tutorial/taskflow.rst
index baf6f7e04af..11bfc1b47b4 100644
--- a/airflow-core/docs/tutorial/taskflow.rst
+++ b/airflow-core/docs/tutorial/taskflow.rst
@@ -270,7 +270,7 @@ system-level packages. TaskFlow supports multiple execution environments to isol
 Creates a temporary virtualenv at task runtime. Great for experimental or dynamic tasks, but may have cold start
 overhead.
 
-.. exampleinclude:: /../../providers/standard/tests/system/standard/example_python_decorator.py
+.. exampleinclude:: /../../providers/standard/src/airflow/providers/standard/example_dags//example_python_decorator.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_python_venv]
@@ -284,7 +284,7 @@ overhead.
 
 Executes the task using a pre-installed Python interpreter — ideal for consistent environments or shared virtualenvs.
 
-.. exampleinclude:: /../../providers/standard/tests/system/standard/example_python_decorator.py
+.. exampleinclude:: /../../providers/standard/src/airflow/providers/standard/example_dags//example_python_decorator.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_external_python]
@@ -334,7 +334,7 @@ Using Sensors
 Use ``@task.sensor`` to build lightweight, reusable sensors using Python functions. These support both poke and reschedule
 modes.
 
-.. exampleinclude:: /../../providers/standard/tests/system/standard/example_sensor_decorator.py
+.. exampleinclude:: /../../providers/standard/src/airflow/providers/standard/example_dags//example_sensor_decorator.py
     :language: python
     :start-after: [START tutorial]
     :end-before: [END tutorial]
diff --git a/airflow-core/src/airflow/example_dags/standard b/airflow-core/src/airflow/example_dags/standard
index c5f1f37b527..3c2ef23d52c 120000
--- a/airflow-core/src/airflow/example_dags/standard
+++ b/airflow-core/src/airflow/example_dags/standard
@@ -1 +1 @@
-../../../../providers/standard/tests/system/standard/
\ No newline at end of file
+../../../../providers/standard/src/airflow/providers/standard/example_dags
\ No newline at end of file
diff --git a/airflow-core/tests/unit/jobs/test_scheduler_job.py b/airflow-core/tests/unit/jobs/test_scheduler_job.py
index c1f926cfdbe..9caeb067e09 100644
--- a/airflow-core/tests/unit/jobs/test_scheduler_job.py
+++ b/airflow-core/tests/unit/jobs/test_scheduler_job.py
@@ -74,7 +74,7 @@ from airflow.utils.state import DagRunState, State, TaskInstanceState
 from airflow.utils.thread_safe_dict import ThreadSafeDict
 from airflow.utils.types import DagRunTriggeredByType, DagRunType
 
-from system import standard
+from tests_common.pytest_plugin import AIRFLOW_ROOT_PATH
 from tests_common.test_utils.asserts import assert_queries_count
 from tests_common.test_utils.config import conf_vars, env_vars
 from tests_common.test_utils.db import (
@@ -97,14 +97,20 @@ from unit.utils.test_timezone import UTC
 
 pytestmark = pytest.mark.db_test
 
-ROOT_FOLDER = os.path.realpath(
-    os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, os.pardir)
-)
-PERF_DAGS_FOLDER = os.path.join(ROOT_FOLDER, "tests", "test_utils", "perf", "dags")
+PERF_DAGS_FOLDER = AIRFLOW_ROOT_PATH / "dev" / "airflow_perf" / "dags"
 ELASTIC_DAG_FILE = os.path.join(PERF_DAGS_FOLDER, "elastic_dag.py")
 
 TEST_DAG_FOLDER = os.environ["AIRFLOW__CORE__DAGS_FOLDER"]
-EXAMPLE_STANDARD_DAGS_FOLDER = standard.__path__[0]
+EXAMPLE_STANDARD_DAGS_FOLDER = (
+    AIRFLOW_ROOT_PATH
+    / "providers"
+    / "standard"
+    / "src"
+    / "airflow"
+    / "providers"
+    / "standard"
+    / "example_dags"
+)
 DEFAULT_DATE = timezone.datetime(2016, 1, 1)
 DEFAULT_LOGICAL_DATE = timezone.coerce_datetime(DEFAULT_DATE)
 TRY_NUMBER = 1
@@ -6487,7 +6493,7 @@ class TestSchedulerJobQueriesCount:
         [
             (21, 1, 1),  # One DAG with one task per DAG file.
             (21, 1, 5),  # One DAG with five tasks per DAG file.
-            (93, 10, 10),  # 10 DAGs with 10 tasks per DAG file.
+            (148, 10, 10),  # 10 DAGs with 10 tasks per DAG file.
         ],
     )
     def test_execute_queries_count_with_harvested_dags(
@@ -6528,7 +6534,9 @@ class TestSchedulerJobQueriesCount:
                 dr = dag.create_dagrun(
                     state=State.RUNNING,
                     run_id=f"{DagRunType.MANUAL.value}__{i}",
-                    dag_hash=dagbag.dags_hash[dag.dag_id],
+                    run_after=pendulum.datetime(2025, 1, 1, tz="UTC"),
+                    run_type=DagRunType.MANUAL,
+                    triggered_by=DagRunTriggeredByType.TEST,
                 )
                 dagruns.append(dr)
                 for ti in dr.get_task_instances():
@@ -6574,13 +6582,13 @@ class TestSchedulerJobQueriesCount:
             # 10 DAGs with 10 tasks per DAG file.
             ([10, 10, 10, 10], 10, 10, "1d", "None", "no_structure"),
             ([10, 10, 10, 10], 10, 10, "1d", "None", "linear"),
-            ([105, 38, 38, 38], 10, 10, "1d", "@once", "no_structure"),
-            ([115, 51, 51, 51], 10, 10, "1d", "@once", "linear"),
-            ([105, 119, 119, 119], 10, 10, "1d", "30m", "no_structure"),
-            ([115, 145, 145, 145], 10, 10, "1d", "30m", "linear"),
-            ([115, 139, 139, 139], 10, 10, "1d", "30m", "binary_tree"),
-            ([115, 139, 139, 139], 10, 10, "1d", "30m", "star"),
-            ([115, 139, 139, 139], 10, 10, "1d", "30m", "grid"),
+            ([218, 69, 69, 69], 10, 10, "1d", "@once", "no_structure"),
+            ([228, 84, 84, 84], 10, 10, "1d", "@once", "linear"),
+            ([217, 119, 119, 119], 10, 10, "1d", "30m", "no_structure"),
+            ([2227, 145, 145, 145], 10, 10, "1d", "30m", "linear"),
+            ([227, 139, 139, 139], 10, 10, "1d", "30m", "binary_tree"),
+            ([227, 139, 139, 139], 10, 10, "1d", "30m", "star"),
+            ([227, 259, 259, 259], 10, 10, "1d", "30m", "grid"),
         ],
     )
     def test_process_dags_queries_count(
diff --git a/devel-common/src/docs/provider_conf.py b/devel-common/src/docs/provider_conf.py
index 4b3f433ab76..ce5f09188d3 100644
--- a/devel-common/src/docs/provider_conf.py
+++ b/devel-common/src/docs/provider_conf.py
@@ -61,7 +61,6 @@ from docs.utils.conf_constants import (
     get_html_theme_options,
     get_intersphinx_mapping,
     get_rst_epilogue,
-    get_rst_filepath_from_path,
 )
 from sphinx_exts.provider_yaml_utils import load_package_data
 
@@ -161,10 +160,10 @@ exclude_patterns = [
     *[f"_api/tests/system/{subpackage}/index.rst" for subpackage in empty_subpackages],
 ]
 
-exclude_patterns.extend(
-    get_rst_filepath_from_path(f, AIRFLOW_REPO_ROOT_PATH)
-    for f in BASE_PROVIDER_SRC_PATH.rglob("example_dags")
-)
+# exclude_patterns.extend(
+#     get_rst_filepath_from_path(f, AIRFLOW_REPO_ROOT_PATH)
+#     for f in BASE_PROVIDER_SRC_PATH.rglob("example_dags")
+# )
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ["templates"]
@@ -296,7 +295,6 @@ autoapi_ignore.extend(
     (
         "*/airflow/__init__.py",
         "*/airflow/providers/__init__.py",
-        "*/example_dags/*",
         "*/providers/__init__.py",
         "*/conf/*",
     )
diff --git a/docs/spelling_wordlist.txt b/docs/spelling_wordlist.txt
index 630e80ade9c..ebde20530a4 100644
--- a/docs/spelling_wordlist.txt
+++ b/docs/spelling_wordlist.txt
@@ -1311,6 +1311,7 @@ pluggable
 pluggy
 plyvel
 png
+PoC
 PodManager
 podName
 PodSpec
diff --git a/providers/arangodb/docs/index.rst b/providers/arangodb/docs/index.rst
index 74c056af737..85cd0aa3c0a 100644
--- a/providers/arangodb/docs/index.rst
+++ b/providers/arangodb/docs/index.rst
@@ -49,13 +49,7 @@
     :maxdepth: 1
     :caption: Resources
 
-    Example DAGs <https://github.com/apache/airflow/tree/providers-arangodb/|version|/airflow/providers/arangodb/example_dags>
-
-.. toctree::
-    :hidden:
-    :maxdepth: 1
-    :caption: Resources
-
+    Example DAGs <_api/airflow/providers/arangodb/example_dags/index>
     PyPI Repository <https://pypi.org/project/apache-airflow-providers-arangodb/>
     Installing from sources <installing-providers-from-sources>
 
diff --git a/providers/edge3/docs/index.rst b/providers/edge3/docs/index.rst
index 92c3812920a..a45c239ef86 100644
--- a/providers/edge3/docs/index.rst
+++ b/providers/edge3/docs/index.rst
@@ -47,6 +47,13 @@
     Configuration <configurations-ref>
     CLI <cli-ref>
     Python API <_api/airflow/providers/edge3/index>
+
+.. toctree::
+    :hidden:
+    :maxdepth: 1
+    :caption: Resources
+
+    Example DAGs <_api/airflow/providers/edge3/example_dags/index>
     PyPI Repository <https://pypi.org/project/apache-airflow-providers-edge3/>
     Installing from sources <installing-providers-from-sources>
 
diff --git a/providers/edge3/src/airflow/providers/edge3/example_dags/win_notepad.py b/providers/edge3/src/airflow/providers/edge3/example_dags/win_notepad.py
index d59066261ac..6b875dd2aca 100644
--- a/providers/edge3/src/airflow/providers/edge3/example_dags/win_notepad.py
+++ b/providers/edge3/src/airflow/providers/edge3/example_dags/win_notepad.py
@@ -41,7 +41,7 @@ if TYPE_CHECKING:
 
 
 class NotepadOperator(BaseOperator):
-    """Example Operator Implementation which starts a Notepod.exe on WIndows."""
+    """Example Operator Implementation which starts a ``Notepad.exe`` on Windows."""
 
     template_fields: Sequence[str] = "text"
 
diff --git a/providers/oracle/docs/index.rst b/providers/oracle/docs/index.rst
index b05e5034ed3..ffdf3687acc 100644
--- a/providers/oracle/docs/index.rst
+++ b/providers/oracle/docs/index.rst
@@ -56,7 +56,7 @@
     :maxdepth: 1
     :caption: Resources
 
-    Example DAGs <https://github.com/apache/airflow/tree/providers-oracle/|version|/airflow/providers/oracle/example_dags>
+    Example DAGs <_api/airflow/providers/oracle/example_dags/index>
     PyPI Repository <https://pypi.org/project/apache-airflow-providers-oracle/>
     Installing from sources <installing-providers-from-sources>
 
diff --git a/providers/standard/docs/index.rst b/providers/standard/docs/index.rst
index 5ddaa7eef24..88b11909db0 100644
--- a/providers/standard/docs/index.rst
+++ b/providers/standard/docs/index.rst
@@ -38,19 +38,12 @@
     Sensors <sensors/index>
     Configuration <configurations-ref>
 
-.. toctree::
-    :hidden:
-    :maxdepth: 1
-    :caption: System tests
-
-    System Tests <_api/tests/system/standard/index>
-
 .. toctree::
     :hidden:
     :maxdepth: 1
     :caption: Resources
 
-    Example DAGs <https://github.com/apache/airflow/tree/providers-standard/|version|/providers/standard/tests/system/standard>
+    Example DAGs <_api/airflow/providers/standard/example_dags/index>
     PyPI Repository <https://pypi.org/project/apache-airflow-providers-standard/>
     Installing from sources <installing-providers-from-sources>
     Python API <_api/airflow/providers/standard/index>
diff --git a/providers/standard/docs/operators/bash.rst b/providers/standard/docs/operators/bash.rst
index 0831403020c..20267524783 100644
--- a/providers/standard/docs/operators/bash.rst
+++ b/providers/standard/docs/operators/bash.rst
@@ -41,7 +41,7 @@ determined by:
     .. tab-item:: @task.bash
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_decorator_bash]
@@ -50,7 +50,7 @@ determined by:
     .. tab-item:: BashOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_bash_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_bash]
@@ -67,7 +67,7 @@ You can use :ref:`Jinja templates <concepts:jinja-templating>` to parameterize t
     .. tab-item:: @task.bash
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_decorator_bash_template]
@@ -76,7 +76,7 @@ You can use :ref:`Jinja templates <concepts:jinja-templating>` to parameterize t
     .. tab-item:: BashOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_bash_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_bash_template]
@@ -85,7 +85,7 @@ You can use :ref:`Jinja templates <concepts:jinja-templating>` to parameterize t
 Using the ``@task.bash`` TaskFlow decorator allows you to return a formatted string and take advantage of
 having all :ref:`execution context variables directly accessible to decorated tasks <taskflow/accessing_context_variables>`.
 
-.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
     :language: python
     :dedent: 4
     :start-after: [START howto_decorator_bash_context_vars]
@@ -169,7 +169,7 @@ exit code if you pass ``skip_on_exit_code``).
     .. tab-item:: @task.bash
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_decorator_bash_skip]
@@ -178,7 +178,7 @@ exit code if you pass ``skip_on_exit_code``).
     .. tab-item:: BashOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_bash_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_operator.py
             :language: python
             :start-after: [START howto_operator_bash_skip]
             :end-before: [END howto_operator_bash_skip]
@@ -388,7 +388,7 @@ or even build the Bash command(s) to execute.
 
 For example, use conditional logic to determine task behavior:
 
-.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
     :language: python
     :dedent: 4
     :start-after: [START howto_decorator_bash_conditional]
@@ -396,7 +396,7 @@ For example, use conditional logic to determine task behavior:
 
 Or call a function to help build a Bash command:
 
-.. exampleinclude:: /../tests/system/standard/example_bash_decorator.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_bash_decorator.py
     :language: python
     :dedent: 4
     :start-after: [START howto_decorator_bash_build_cmd]
diff --git a/providers/standard/docs/operators/datetime.rst b/providers/standard/docs/operators/datetime.rst
index 251e933cbad..cc559b11be9 100644
--- a/providers/standard/docs/operators/datetime.rst
+++ b/providers/standard/docs/operators/datetime.rst
@@ -39,7 +39,7 @@ take some time between when the DAGRun was scheduled and executed and it might m
 the DAGRun was scheduled properly, the actual time used for branching decision will be different than the
 schedule time and the branching decision might be different depending on those delays.
 
-.. exampleinclude:: /../tests/system/standard/example_branch_datetime_operator.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
     :language: python
     :start-after: [START howto_branch_datetime_operator]
     :end-before: [END howto_branch_datetime_operator]
@@ -50,7 +50,7 @@ the current date in order to allow comparisons with it. In the event that ``targ
 to a ``datetime.time`` that occurs before the given ``target_lower``, a day will be added to ``target_upper``.
 This is done to allow for time periods that span over two dates.
 
-.. exampleinclude:: /../tests/system/standard/example_branch_datetime_operator.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
     :language: python
     :start-after: [START howto_branch_datetime_operator_next_day]
     :end-before: [END howto_branch_datetime_operator_next_day]
@@ -66,7 +66,7 @@ The usage is much more "data range" friendly. The ``logical_date`` does not chan
 it is not affected by execution delays, so this approach is suitable for idempotent DAG runs that might be
 back-filled.
 
-.. exampleinclude:: /../tests/system/standard/example_branch_datetime_operator.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
     :language: python
     :start-after: [START howto_branch_datetime_operator_logical_date]
     :end-before: [END howto_branch_datetime_operator_logical_date]
@@ -78,7 +78,7 @@ BranchDayOfWeekOperator
 
 Use the :class:`~airflow.operators.weekday.BranchDayOfWeekOperator` to branch your workflow based on week day value.
 
-.. exampleinclude:: /../tests/system/standard/example_branch_day_of_week_operator.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_day_of_week_branch]
diff --git a/providers/standard/docs/operators/latest_only.rst b/providers/standard/docs/operators/latest_only.rst
index 21e66a12491..e0d48608da3 100644
--- a/providers/standard/docs/operators/latest_only.rst
+++ b/providers/standard/docs/operators/latest_only.rst
@@ -24,7 +24,7 @@ LatestOnlyOperator
 
 Use the :class:`~airflow.providers.standard.operators.latest_only.LatestOnlyOperator`.
 
-.. exampleinclude:: /../tests/system/standard/example_latest_only.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_latest_only.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_latest_only]
diff --git a/providers/standard/docs/operators/python.rst b/providers/standard/docs/operators/python.rst
index 8f6f8d7d681..60e2c83b5f1 100644
--- a/providers/standard/docs/operators/python.rst
+++ b/providers/standard/docs/operators/python.rst
@@ -32,7 +32,7 @@ Use the :class:`~airflow.providers.standard.operators.python.PythonOperator` to
     .. tab-item:: @task
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_python_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python]
@@ -41,7 +41,7 @@ Use the :class:`~airflow.providers.standard.operators.python.PythonOperator` to
     .. tab-item:: PythonOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_python_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python]
@@ -57,7 +57,7 @@ Pass extra arguments to the ``@task`` decorated function as you would with a nor
     .. tab-item:: @task
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_python_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python_kwargs]
@@ -66,7 +66,7 @@ Pass extra arguments to the ``@task`` decorated function as you would with a nor
     .. tab-item:: PythonOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_python_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python_kwargs]
@@ -87,7 +87,7 @@ is evaluated as a :ref:`Jinja template <concepts:jinja-templating>`.
     .. tab-item:: @task
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_python_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python_render_sql]
@@ -96,7 +96,7 @@ is evaluated as a :ref:`Jinja template <concepts:jinja-templating>`.
     .. tab-item:: PythonOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_python_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python_render_sql]
@@ -137,7 +137,7 @@ smoother data exchange, while still effectively handling common Python objects a
     .. tab-item:: @task.virtualenv
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_python_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python_venv]
@@ -146,7 +146,7 @@ smoother data exchange, while still effectively handling common Python objects a
     .. tab-item:: PythonVirtualenvOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_python_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_python_venv]
@@ -251,7 +251,7 @@ in main Airflow environment).
     .. tab-item:: @task.external_python
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_python_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_external_python]
@@ -260,7 +260,7 @@ in main Airflow environment).
     .. tab-item:: ExternalPythonOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_python_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_python_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_external_python]
@@ -308,7 +308,7 @@ tasks.
     .. tab-item:: @task.branch
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_branch_operator_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_operator_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_branch_python]
@@ -317,7 +317,7 @@ tasks.
     .. tab-item:: PythonBranchOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_branch_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_branch_python]
@@ -345,7 +345,7 @@ tasks and is a hybrid of the :class:`~airflow.providers.standard.operators.pytho
     .. tab-item:: @task.branch_virtualenv
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_branch_operator_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_operator_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_branch_virtualenv]
@@ -354,7 +354,7 @@ tasks and is a hybrid of the :class:`~airflow.providers.standard.operators.pytho
     .. tab-item:: BranchPythonVirtualenvOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_branch_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_branch_virtualenv]
@@ -383,7 +383,7 @@ external Python environment.
     .. tab-item:: @task.branch_external_python
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_branch_operator_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_operator_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_branch_ext_py]
@@ -392,7 +392,7 @@ external Python environment.
     .. tab-item:: BranchExternalPythonOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_branch_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_branch_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_branch_ext_py]
@@ -428,7 +428,7 @@ skipped.
     .. tab-item:: @task.short_circuit
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_short_circuit_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_short_circuit_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_short_circuit]
@@ -437,7 +437,7 @@ skipped.
     .. tab-item:: ShortCircuitOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_short_circuit_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_short_circuit]
@@ -463,7 +463,7 @@ tasks have completed running regardless of status (i.e. the ``TriggerRule.ALL_DO
     .. tab-item:: @task.short_circuit
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_short_circuit_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_short_circuit_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_short_circuit_trigger_rules]
@@ -472,7 +472,7 @@ tasks have completed running regardless of status (i.e. the ``TriggerRule.ALL_DO
     .. tab-item:: ShortCircuitOperator
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_short_circuit_operator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
             :language: python
             :dedent: 4
             :start-after: [START howto_operator_short_circuit_trigger_rules]
diff --git a/providers/standard/docs/operators/trigger_dag_run.rst b/providers/standard/docs/operators/trigger_dag_run.rst
index 1db20b35ece..be7414a2aee 100644
--- a/providers/standard/docs/operators/trigger_dag_run.rst
+++ b/providers/standard/docs/operators/trigger_dag_run.rst
@@ -24,7 +24,7 @@ TriggerDagRunOperator
 
 Use the :class:`~airflow.providers.standard.operators.trigger_dagrun.TriggerDagRunOperator` to trigger dag from another dag.
 
-.. exampleinclude:: /../tests/system/standard/example_trigger_controller_dag.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_trigger_controller_dag.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_trigger_dagrun]
diff --git a/providers/standard/docs/sensors/bash.rst b/providers/standard/docs/sensors/bash.rst
index 5acabb1172c..17bb9c10d66 100644
--- a/providers/standard/docs/sensors/bash.rst
+++ b/providers/standard/docs/sensors/bash.rst
@@ -25,7 +25,7 @@ BashSensor
 Use the :class:`~airflow.providers.standard.sensors.bash.BashSensor` to use arbitrary command for sensing. The command
 should return 0 when it succeeds, any other value otherwise.
 
-.. exampleinclude:: /../tests/system/standard/example_sensors.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
     :language: python
     :dedent: 4
     :start-after: [START example_bash_sensors]
diff --git a/providers/standard/docs/sensors/datetime.rst b/providers/standard/docs/sensors/datetime.rst
index aabff0f866d..2abbfa01918 100644
--- a/providers/standard/docs/sensors/datetime.rst
+++ b/providers/standard/docs/sensors/datetime.rst
@@ -25,7 +25,7 @@ TimeDeltaSensor
 Use the :class:`~airflow.providers.standard.sensors.time_delta.TimeDeltaSensor` to end sensing after specific time.
 
 
-.. exampleinclude:: /../tests/system/standard/example_sensors.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
     :language: python
     :dedent: 4
     :start-after: [START example_time_delta_sensor]
@@ -41,7 +41,7 @@ Use the :class:`~airflow.providers.standard.sensors.time_delta.TimeDeltaSensorAs
 It is an async version of the operator and requires Triggerer to run.
 
 
-.. exampleinclude:: /../tests/system/standard/example_sensors.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
     :language: python
     :dedent: 4
     :start-after: [START example_time_delta_sensor_async]
@@ -58,7 +58,7 @@ Use the :class:`~airflow.providers.standard.sensors.time_sensor.TimeSensor` to e
 
 Time will be evaluated against ``data_interval_end`` if present for the dag run, otherwise ``run_after`` will be used.
 
-.. exampleinclude:: /../tests/system/standard/example_sensors.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
     :language: python
     :dedent: 4
     :start-after: [START example_time_sensors]
@@ -88,7 +88,7 @@ DayOfWeekSensor
 
 Use the :class:`~airflow.sensors.weekday.DayOfWeekSensor` to sense for day of week.
 
-.. exampleinclude:: /../tests/system/standard/example_sensors.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
     :language: python
     :dedent: 4
     :start-after: [START example_day_of_week_sensor]
diff --git a/providers/standard/docs/sensors/external_task_sensor.rst b/providers/standard/docs/sensors/external_task_sensor.rst
index 8aec0bb7858..bf8114c5a80 100644
--- a/providers/standard/docs/sensors/external_task_sensor.rst
+++ b/providers/standard/docs/sensors/external_task_sensor.rst
@@ -47,7 +47,7 @@ wait for another task on a different DAG for a specific ``execution_date``.
 ExternalTaskSensor also provide options to set if the Task on a remote DAG succeeded or failed
 via ``allowed_states`` and ``failed_states`` parameters.
 
-.. exampleinclude:: /../tests/system/standard/example_external_task_marker_dag.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_external_task_marker_dag.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_external_task_sensor]
@@ -55,7 +55,7 @@ via ``allowed_states`` and ``failed_states`` parameters.
 
 Also for this action you can use sensor in the deferrable mode:
 
-.. exampleinclude:: /../tests/system/standard/example_external_task_parent_deferrable.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_external_task_parent_deferrable.py
     :language: python
     :dedent: 4
     :start-after: [START howto_external_task_async_sensor]
@@ -67,7 +67,7 @@ ExternalTaskSensor with task_group dependency
 In Addition, we can also use the :class:`~airflow.providers.standard.sensors.external_task.ExternalTaskSensor` to make tasks on a DAG
 wait for another ``task_group`` on a different DAG for a specific ``execution_date``.
 
-.. exampleinclude:: /../tests/system/standard/example_external_task_marker_dag.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_external_task_marker_dag.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_external_task_sensor_with_task_group]
@@ -81,7 +81,7 @@ on ``child_dag`` for a specific ``execution_date`` should also be cleared, ``Ext
 should be used. Note that ``child_task1`` will only be cleared if "Recursive" is selected when the
 user clears ``parent_task``.
 
-.. exampleinclude:: /../tests/system/standard/example_external_task_marker_dag.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_external_task_marker_dag.py
     :language: python
     :dedent: 4
     :start-after: [START howto_operator_external_task_marker]
diff --git a/providers/standard/docs/sensors/file.rst b/providers/standard/docs/sensors/file.rst
index a2f2b42ce3f..893cabf106c 100644
--- a/providers/standard/docs/sensors/file.rst
+++ b/providers/standard/docs/sensors/file.rst
@@ -26,7 +26,7 @@ Use the :class:`~airflow.providers.standard.sensors.filesystem.FileSensor` to de
 filesystem. You need to have connection defined to use it (pass connection id via ``fs_conn_id``).
 Default connection is ``fs_default``.
 
-.. exampleinclude:: /../tests/system/standard/example_sensors.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
     :language: python
     :dedent: 4
     :start-after: [START example_file_sensor]
@@ -34,7 +34,7 @@ Default connection is ``fs_default``.
 
 Also for this job you can use sensor in the deferrable mode:
 
-.. exampleinclude:: /../tests/system/standard/example_sensors.py
+.. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
     :language: python
     :dedent: 4
     :start-after: [START example_file_sensor_async]
diff --git a/providers/standard/docs/sensors/python.rst b/providers/standard/docs/sensors/python.rst
index 1850a272d30..6a9118e8db0 100644
--- a/providers/standard/docs/sensors/python.rst
+++ b/providers/standard/docs/sensors/python.rst
@@ -34,7 +34,7 @@ value to be True.
     .. tab-item:: @task.sensor
         :sync: taskflow
 
-        .. exampleinclude:: /../tests/system/standard/example_sensor_decorator.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensor_decorator.py
             :language: python
             :dedent: 4
             :start-after: [START wait_function]
@@ -43,7 +43,7 @@ value to be True.
     .. tab-item:: PythonSensor
         :sync: operator
 
-        .. exampleinclude:: /../tests/system/standard/example_sensors.py
+        .. exampleinclude:: /../src/airflow/providers/standard/example_dags/example_sensors.py
             :language: python
             :dedent: 4
             :start-after: [START example_python_sensors]
diff --git a/providers/standard/tests/system/standard/__init__.py b/providers/standard/src/airflow/providers/standard/example_dags/__init__.py
similarity index 100%
rename from providers/standard/tests/system/standard/__init__.py
rename to providers/standard/src/airflow/providers/standard/example_dags/__init__.py
diff --git a/providers/standard/tests/system/standard/example_bash_decorator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_bash_decorator.py
similarity index 95%
rename from providers/standard/tests/system/standard/example_bash_decorator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_bash_decorator.py
index ce95b62ce6f..89335c06864 100644
--- a/providers/standard/tests/system/standard/example_bash_decorator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_bash_decorator.py
@@ -112,9 +112,3 @@ def example_bash_decorator():
 
 
 example_bash_decorator()
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_bash_operator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_bash_operator.py
similarity index 92%
rename from providers/standard/tests/system/standard/example_bash_operator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_bash_operator.py
index 7ef7c0db2ef..a4fb3161ab6 100644
--- a/providers/standard/tests/system/standard/example_bash_operator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_bash_operator.py
@@ -72,9 +72,3 @@ this_will_skip = BashOperator(
 )
 # [END howto_operator_bash_skip]
 this_will_skip >> run_this_last
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_branch_datetime_operator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
similarity index 93%
rename from providers/standard/tests/system/standard/example_branch_datetime_operator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
index b1e75641333..710bdb1de89 100644
--- a/providers/standard/tests/system/standard/example_branch_datetime_operator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_datetime_operator.py
@@ -103,11 +103,3 @@ cond3 = BranchDateTimeOperator(
 # Run empty_task_13 if cond3 executes between 2020-10-10 14:00:00 and 2020-10-10 15:00:00
 cond3 >> [empty_task_13, empty_task_23]
 # [END howto_branch_datetime_operator_logical_date]
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag1)
-test_run2 = get_test_run(dag2)
-test_run3 = get_test_run(dag3)
diff --git a/providers/standard/tests/system/standard/example_branch_day_of_week_operator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
similarity index 92%
rename from providers/standard/tests/system/standard/example_branch_day_of_week_operator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
index 3b541d2712d..43400522468 100644
--- a/providers/standard/tests/system/standard/example_branch_day_of_week_operator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_day_of_week_operator.py
@@ -59,9 +59,3 @@ with DAG(
     # Run empty_task_3 if it's a weekend, empty_task_4 otherwise
     empty_task_2 >> branch_weekend >> [empty_task_3, empty_task_4]
     # [END howto_operator_day_of_week_branch]
-
-
-from tests_common.test_utils.system_tests import get_test_run
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_branch_operator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_operator.py
similarity index 96%
rename from providers/standard/tests/system/standard/example_branch_operator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_branch_operator.py
index 98c85444cdd..0bb429a6f8f 100644
--- a/providers/standard/tests/system/standard/example_branch_operator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_operator.py
@@ -164,9 +164,3 @@ with DAG(
 
         # Label is optional here, but it can help identify more complex branches
         branching_venv >> Label(option) >> t >> join_venv
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_branch_operator_decorator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_operator_decorator.py
similarity index 96%
rename from providers/standard/tests/system/standard/example_branch_operator_decorator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_branch_operator_decorator.py
index 3a3b34e50d1..d3634acb998 100644
--- a/providers/standard/tests/system/standard/example_branch_operator_decorator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_branch_operator_decorator.py
@@ -140,9 +140,3 @@ with DAG(
 
         # Label is optional here, but it can help identify more complex branches
         random_choice_venv >> Label(option) >> t >> join_venv
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_external_task_child_deferrable.py b/providers/standard/src/airflow/providers/standard/example_dags/example_external_task_child_deferrable.py
similarity index 87%
rename from providers/standard/tests/system/standard/example_external_task_child_deferrable.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_external_task_child_deferrable.py
index 1da360b57b5..c1b8f85b421 100644
--- a/providers/standard/tests/system/standard/example_external_task_child_deferrable.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_external_task_child_deferrable.py
@@ -32,9 +32,3 @@ with DAG(
         task_id="child_task",
         bash_command="echo 1; sleep 1; echo 2; sleep 2; echo 3; sleep 3",
     )
-
-
-from tests_common.test_utils.system_tests import get_test_run
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_external_task_marker_dag.py b/providers/standard/src/airflow/providers/standard/example_dags/example_external_task_marker_dag.py
similarity index 94%
rename from providers/standard/tests/system/standard/example_external_task_marker_dag.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_external_task_marker_dag.py
index d310f369611..b8fad182549 100644
--- a/providers/standard/tests/system/standard/example_external_task_marker_dag.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_external_task_marker_dag.py
@@ -96,9 +96,3 @@ with DAG(
 
     child_task3 = EmptyOperator(task_id="child_task3")
     child_task1 >> child_task2 >> child_task3
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(parent_dag)
diff --git a/providers/standard/tests/system/standard/example_external_task_parent_deferrable.py b/providers/standard/src/airflow/providers/standard/example_dags/example_external_task_parent_deferrable.py
similarity index 92%
rename from providers/standard/tests/system/standard/example_external_task_parent_deferrable.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_external_task_parent_deferrable.py
index 090522fe924..fcfc8b7dac3 100644
--- a/providers/standard/tests/system/standard/example_external_task_parent_deferrable.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_external_task_parent_deferrable.py
@@ -62,9 +62,3 @@ with DAG(
     # This test needs watcher in order to properly mark success/failure
     # when "teardown" task with trigger rule is part of the DAG
     list(dag.tasks) >> watcher()
-
-
-from tests_common.test_utils.system_tests import get_test_run
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_latest_only.py b/providers/standard/src/airflow/providers/standard/example_dags/example_latest_only.py
similarity index 88%
rename from providers/standard/tests/system/standard/example_latest_only.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_latest_only.py
index 983db906bdb..745100def2a 100644
--- a/providers/standard/tests/system/standard/example_latest_only.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_latest_only.py
@@ -38,9 +38,3 @@ with DAG(
     task1 = EmptyOperator(task_id="task1")
 
     latest_only >> task1
-
-
-from tests_common.test_utils.system_tests import get_test_run
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_python_decorator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_python_decorator.py
similarity index 95%
rename from providers/standard/tests/system/standard/example_python_decorator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_python_decorator.py
index 8b26d948426..ac9938d92ea 100644
--- a/providers/standard/tests/system/standard/example_python_decorator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_python_decorator.py
@@ -130,9 +130,3 @@ def example_python_decorator():
 
 
 example_dag = example_python_decorator()
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(example_dag)
diff --git a/providers/standard/tests/system/standard/example_python_operator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_python_operator.py
similarity index 96%
rename from providers/standard/tests/system/standard/example_python_operator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_python_operator.py
index 27ca2db12e9..18aa8f207e3 100644
--- a/providers/standard/tests/system/standard/example_python_operator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_python_operator.py
@@ -145,9 +145,3 @@ with DAG(
     # [END howto_operator_external_python]
 
     run_this >> external_python_task >> virtualenv_task
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_sensor_decorator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_sensor_decorator.py
similarity index 90%
rename from providers/standard/tests/system/standard/example_sensor_decorator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_sensor_decorator.py
index eaceebab9f3..64ea80400ce 100644
--- a/providers/standard/tests/system/standard/example_sensor_decorator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_sensor_decorator.py
@@ -64,9 +64,3 @@ tutorial_etl_dag = example_sensor_decorator()
 # [END dag_invocation]
 
 # [END tutorial]
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_sensors.py b/providers/standard/src/airflow/providers/standard/example_dags/example_sensors.py
similarity index 95%
rename from providers/standard/tests/system/standard/example_sensors.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_sensors.py
index b5ea2f458fd..5ec33bad51b 100644
--- a/providers/standard/tests/system/standard/example_sensors.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_sensors.py
@@ -130,9 +130,3 @@ with DAG(
     t8 >> tx
     [t9, t10] >> tx
     t11 >> tx
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_short_circuit_decorator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_decorator.py
similarity index 92%
rename from providers/standard/tests/system/standard/example_short_circuit_decorator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_decorator.py
index 93b32a92450..714325b1739 100644
--- a/providers/standard/tests/system/standard/example_short_circuit_decorator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_decorator.py
@@ -58,9 +58,3 @@ def example_short_circuit_decorator():
 
 
 example_dag = example_short_circuit_decorator()
-
-
-from tests_common.test_utils.system_tests import get_test_run  # noqa: E402
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(example_dag)
diff --git a/providers/standard/tests/system/standard/example_short_circuit_operator.py b/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
similarity index 92%
rename from providers/standard/tests/system/standard/example_short_circuit_operator.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
index 892be8934ae..7f2b8ec39af 100644
--- a/providers/standard/tests/system/standard/example_short_circuit_operator.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_short_circuit_operator.py
@@ -64,9 +64,3 @@ with DAG(
 
     chain(task_1, [task_2, short_circuit], [task_3, task_4], [task_5, task_6], task_7)
     # [END howto_operator_short_circuit_trigger_rules]
-
-
-from tests_common.test_utils.system_tests import get_test_run
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/example_trigger_controller_dag.py b/providers/standard/src/airflow/providers/standard/example_dags/example_trigger_controller_dag.py
similarity index 90%
rename from providers/standard/tests/system/standard/example_trigger_controller_dag.py
rename to providers/standard/src/airflow/providers/standard/example_dags/example_trigger_controller_dag.py
index 3a85fb7e0af..8ca49e34b3d 100644
--- a/providers/standard/tests/system/standard/example_trigger_controller_dag.py
+++ b/providers/standard/src/airflow/providers/standard/example_dags/example_trigger_controller_dag.py
@@ -44,9 +44,3 @@ with DAG(
     )
 
     # [END howto_operator_trigger_dagrun]
-
-
-from tests_common.test_utils.system_tests import get_test_run
-
-# Needed to run the example DAG with pytest (see: tests/system/README.md#run_via_pytest)
-test_run = get_test_run(dag)
diff --git a/providers/standard/tests/system/standard/sql/__init__.py b/providers/standard/src/airflow/providers/standard/example_dags/sql/__init__.py
similarity index 100%
rename from providers/standard/tests/system/standard/sql/__init__.py
rename to providers/standard/src/airflow/providers/standard/example_dags/sql/__init__.py
diff --git a/providers/standard/tests/system/standard/sql/sample.sql b/providers/standard/src/airflow/providers/standard/example_dags/sql/sample.sql
similarity index 100%
rename from providers/standard/tests/system/standard/sql/sample.sql
rename to providers/standard/src/airflow/providers/standard/example_dags/sql/sample.sql
diff --git a/providers/standard/tests/system/__init__.py b/providers/standard/tests/system/__init__.py
deleted file mode 100644
index e8fd2285643..00000000000
--- a/providers/standard/tests/system/__init__.py
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-__path__ = __import__("pkgutil").extend_path(__path__, __name__)  # type: ignore