uranusjr commented on a change in pull request #17121:
URL: https://github.com/apache/airflow/pull/17121#discussion_r698263618
##########
File path: tests/dag_processing/test_processor.py
##########
@@ -404,7 +404,7 @@ def test_process_file_should_failure_callback(self):
@conf_vars({("core", "dagbag_import_error_tracebacks"): "False"})
def
test_add_unparseable_file_before_sched_start_creates_import_error(self, tmpdir):
- unparseable_filename = tmpdir / TEMP_DAG_FILENAME
+ unparseable_filename = os.path.join(tmpdir, TEMP_DAG_FILENAME)
Review comment:
`tmpdir` is not a `pathlib.Path` but a `py._path.LocalPath`, which is a
path object implementation in `pytest` (actually from a package `py` that backs
most of `pytest`) that pre-dates the stdlib `pathlib`.
But you fix is correct—`py._path.LocalPath` implements the new [fspath
protocol](https://docs.python.org/3/library/os.html#os.PathLike) introduced in
Python 3.6 (PEP 519), so it can be consumed by `os.path.join` and coerced into
a str.
--
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]