potiuk commented on code in PR #39513:
URL: https://github.com/apache/airflow/pull/39513#discussion_r1599613412
##########
tests/conftest.py:
##########
@@ -1292,6 +1296,19 @@ def _disable_redact(request: pytest.FixtureRequest,
mocker):
return
[email protected]
+def airflow_root_path() -> Path:
+ import airflow
+
+ return Path(airflow.__path__[0]).parent
+
+
[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:
Ah yeah. I was playing with it before, but yes it could be simplified this
way.
--
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]