potiuk commented on code in PR #27264:
URL: https://github.com/apache/airflow/pull/27264#discussion_r1199598206
##########
tests/dag_processing/test_processor.py:
##########
@@ -812,12 +823,21 @@ def test_import_error_traceback_depth(self, tmpdir):
assert len(import_errors) == 1
import_error = import_errors[0]
assert import_error.filename == unparseable_filename
- expected_stacktrace = (
- "Traceback (most recent call last):\n"
- ' File "{}", line 2, in something\n'
- " return airflow_DAG\n"
- "NameError: name 'airflow_DAG' is not defined\n"
- )
+ if PY311:
+ expected_stacktrace = (
+ "Traceback (most recent call last):\n"
+ ' File "{}", line 2, in something\n'
+ " return airflow_DAG\n"
+ " ^^^^^^^^^^^\n"
Review Comment:
Better stacktraces for Python 3.11:
https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep657
--
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]