Taragolis commented on code in PR #39513:
URL: https://github.com/apache/airflow/pull/39513#discussion_r1596448203
##########
tests/conftest.py:
##########
@@ -1327,3 +1331,17 @@ def requests_mock() -> RequestsMockFixture: ...
# time-machine
@pytest.fixture # type: ignore[no-redef]
def time_machine() -> TimeMachineFixture: ...
+
+
[email protected]
+def airflow_root_path() -> Path:
+ import airflow
+
+ return Path(airflow.__path__[0]).parent
+
+
+# TODO We should remove it eventually when we fix all tests
[email protected]
+def require_running_tests_from_sources() -> None:
+ if not (Path(__file__).parents[1] / "airflow" / "__init__.py").exists():
+ pytest.skip("This test requires tests to be run from sources. Skipping
it")
Review Comment:
Small nit, could we move this above TYPE_CHECKING block?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]