-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Functional tests: allow grep_fail
to accept options
#6463
base: 8.3.x
Are you sure you want to change the base?
Conversation
tests/functional/cli/05-colour.t
Outdated
# FIXME: this test doesn't work because of some interaction between the | ||
# `script` command and colorama. The output includes a color reset char at | ||
# the end despite using colorama.init(autoreset=False). | ||
# script -q -c "cylc scan -t rich --color=never" log > /dev/null 2>&1 | ||
# grep_fail "$ANSI" log -P # no color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test wasn't testing what it was supposed to test before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No because the grep_fail
function didn't use any of the options you provided
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, we should link an issue to this FIXME.
Would this close it: #6076 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No (I tried turning autoreset back on even though that wouldn't make any sense for it to fix the test, and it didn't help).
N.B. I had a look at how colorama works. It bills itself as a package meant only for making colour work on Windows, but I guess we are using it for its init(strip=not use_color)
function that can automatically strip ANSI color chars from print()
calls (it actually patches sys.stdout
and sys.stderr
). However there are >100 open issues and it is in a call-for-maintainers state: tartley/colorama#300.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to #6467 added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine in terms of grep_fail options, question about the disabled test aside.
Like the description says. Split off from #6370
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.?.?.x
branch.