Suraj-kumar00 commented on code in PR #67947:
URL: https://github.com/apache/airflow/pull/67947#discussion_r3448559182
##########
airflow-ctl/tests/airflow_ctl/ctl/commands/test_pool_command.py:
##########
@@ -174,8 +175,10 @@ def test_export_json_to_file(self, mock_client, tmp_path,
capsys):
# Verify output message
captured = capsys.readouterr()
- expected_output = f"Exported {len(exported_data)} pool(s) to
{export_file}"
- assert expected_output in captured.out.replace("\n", "")
+ ansi_escape = re.compile(r"\x1B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])")
+ out_str = ansi_escape.sub("", captured.out).replace("\n", "")
+ # Since rich wraps long lines, newlines are removed, so we assert the
combined text.
+ assert out_str == f"Exported {len(exported_data)} pool(s) to
{export_file}"
Review Comment:
tbh, this was unintentional scope creep from local debugging of
rich-rendered output. Reverted in the latest push.
--
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]