Skip to content
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

Enable colorization using the script command. #455

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/python-non-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@ jobs:
run: |
pylint howdoi *.py --rcfile=.pylintrc
- name: Test with nose
run: |
nose2
if: runner.os == 'Linux'
shell: 'script -q -e -c "bash {0}"'
run: nose2
5 changes: 3 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,6 @@ jobs:
run: |
pylint howdoi *.py --rcfile=.pylintrc
- name: Test with nose
run: |
nose2
if: runner.os == 'Linux'
shell: 'script -q -e -c "bash {0}"'
run: nose2
7 changes: 2 additions & 5 deletions test_howdoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,8 @@ def test_colorize(self):
normal = howdoi.howdoi(query)
colorized = howdoi.howdoi('-c ' + query)

# There is currently an issue with Github actions and colorization
# so do not run checks if we are running in Github
if "GITHUB_ACTION" not in os.environ:
self.assertTrue(normal.find('[38;') == -1)
self.assertTrue(colorized.find('[38;') != -1)
self.assertTrue(normal.find('[38;') == -1)
self.assertTrue(colorized.find('[38;') != -1)

# pylint: disable=line-too-long
def test_get_text_without_links(self):
Expand Down