jason810496 commented on code in PR #47004:
URL: https://github.com/apache/airflow/pull/47004#discussion_r1978492213
##########
tests/core/test_configuration.py:
##########
@@ -938,6 +938,48 @@ def test_deprecated_options(self):
with pytest.warns(DeprecationWarning), conf_vars({("celery",
"celeryd_concurrency"): "99"}):
assert conf.getint("celery", "worker_concurrency") == 99
+ @pytest.mark.parametrize(
+ "deprecated_options_dict, kargs, new_section_expected,
old_section_expected",
+ [
+ pytest.param(
+ {("old_section", "old_key"): ("new_section", "new_key",
"2.0.0")},
+ {"fallback": None},
+ None,
+ "value",
+ id="deprecated_in_different_section_lookup_enabled",
+ ),
+ pytest.param(
+ {("old_section", "old_key"): ("new_section", "new_key",
"2.0.0")},
+ {"fallback": None, "lookup_from_deprecated": False},
+ None,
+ None,
+ id="deprecated_in_different_section_lookup_disabled",
+ ),
+ pytest.param(
+ {("new_section", "old_key"): ("new_section", "new_key",
"2.0.0")},
+ {"fallback": None},
+ "value",
+ None,
+ id="deprecated_in_same_section_lookup_enabled",
+ ),
+ pytest.param(
+ {("new_section", "old_key"): ("new_section", "new_key",
"2.0.0")},
+ {"fallback": None, "lookup_from_deprecated": False},
+ None,
+ None,
+ id="deprecated_in_same_section_lookup_disabled",
+ ),
+ ],
+ )
+ def test_deprecated_options_with_lookup_from_deprecated(
+ self, deprecated_options_dict, kargs, new_section_expected,
old_section_expected
Review Comment:
There are expected value. I think `new_section_expected_value` and
`old_section_expected_value` will be more clear.
--
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]