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 Feb 19, 2022
1 parent e4d401f commit b426b8c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-non-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
pylint howdoi *.py --rcfile=.pylintrc
- name: Test with nose
run: |
nose2
script -e -c nose2
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
pylint howdoi *.py --rcfile=.pylintrc
- name: Test with nose
run: |
nose2
script -e -c 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 b426b8c

Please sign in to comment.