You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/31 13:00:06 UTC

[GitHub] [airflow] ashb commented on a change in pull request #15110: Use pathlib.Path for building paths in testfile

ashb commented on a change in pull request #15110:
URL: https://github.com/apache/airflow/pull/15110#discussion_r604874752



##########
File path: tests/utils/test_dag_processing.py
##########
@@ -50,7 +51,7 @@
 from tests.test_utils.config import conf_vars
 from tests.test_utils.db import clear_db_dags, clear_db_runs, clear_db_serialized_dags
 
-TEST_DAG_FOLDER = os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, 'dags')
+TEST_DAG_FOLDER = pathlib.Path(__file__).parent.parent / 'dags'

Review comment:
       If we make this a str here we can't use `TEST_DAG_FOLDER / "some_dag"` that I do elsewhere.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org