-
Notifications
You must be signed in to change notification settings - Fork 94
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
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.
Merging with 1.5 approvals... |
* upstream/master: Update cylc/flow/rundb.py GH Actions shortlog: check out head ref Add Paul Armstrong to CONTRIBUTING.md Report the error if write attempts fail to the DB Functional tests: allow `grep_fail` to accept options (cylc#6463) Bump dev version Prepare release 8.3.6 Bump pypa/gh-action-pypi-publish from 1.11.0 to 1.12.2 Simplify task state deltas Refactor task killing Bump pypa/gh-action-pypi-publish from 1.10.3 to 1.11.0 (cylc#6455) [skip ci] Spawn parentless sequential xtriggered task on set outputs (cylc#6448) Delete changes.d/6404.fix.md Pass pre-install plugins the value of workflow rundir as options.against source, allowing re-install and validate against source to access previous CLI opts as stored in rose-suite-cylc-install.conf
Like the description says. Split off from #6370
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.?.?.x
branch.