Skip to content

Commit

Permalink
Enable colorization using the script command.
Browse files Browse the repository at this point in the history
  • Loading branch information
gleitz committed Apr 20, 2022
1 parent e4d401f commit bdcb62f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
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

0 comments on commit bdcb62f

Please sign in to comment.