kaxil commented on code in PR #72055:
URL: https://github.com/apache/airflow/pull/72055#discussion_r3997954081
##########
airflow-core/tests/unit/utils/test_db.py:
##########
@@ -229,10 +228,8 @@ def test_has_pending_upgrade_ops(self, initialized_db):
check(config)
def test_default_connections_sort(self):
- pattern = re.compile("conn_id=[\"|'](.*?)[\"|']", re.DOTALL)
- source = inspect.getsource(create_default_connections)
- src = pattern.findall(source)
- assert sorted(src) == src
+ conn_ids = [c.conn_id for c in get_default_connections()]
+ assert conn_ids == sorted(conn_ids)
Review Comment:
`conn_ids == sorted(conn_ids)` is still true when `conn_ids` is empty, so
the vacuous-pass property this PR is fixing survives the fix. #52129 already
emptied this test's input once by moving the literals, and an `assert conn_ids`
on the line above would stop the next refactor doing it again.
--
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]