This is an automated email from the ASF dual-hosted git repository. ephraimanierobi pushed a commit to branch v2-6-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 63969163017003654ad4d63ac0fdd6110086d05e Author: Jarek Potiuk <[email protected]> AuthorDate: Tue Jun 20 23:10:15 2023 +0200 Less precise check for error message in trigger initialization (#32035) The test for error message (introduced in #31999) in trigger initialization expected precise error message, however Python 3.10 changed the details printed when TypeError was converted to string (including the information about class being created not only method). This caused the tests to fail on Python 3.10 and 3.11. Making two asserts with two parts of the message expected solves the problem for all python versions. (cherry picked from commit 12c8099846a55ba43bf7d48bab3d01ab697f97a4) --- tests/jobs/test_triggerer_job.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/jobs/test_triggerer_job.py b/tests/jobs/test_triggerer_job.py index 3e43d8f520..9115372777 100644 --- a/tests/jobs/test_triggerer_job.py +++ b/tests/jobs/test_triggerer_job.py @@ -296,10 +296,8 @@ class TestTriggerRunner: trigger_runner.update_triggers({1}) - assert ( - "Trigger failed; message=__init__() got an unexpected keyword argument 'not_exists_arg'" - in caplog.text - ) + assert "Trigger failed" in caplog.text + assert "got an unexpected keyword argument 'not_exists_arg'" in caplog.text def test_trigger_create_race_condition_18392(session, tmp_path):
