Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbautista committed Jul 2, 2024
1 parent d42b313 commit 1c0c079
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion qtconsole/tests/test_ansi_code_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_clear(self):
def test_colors(self):
""" Do basic controls sequences for colors work?
"""
string = 'first\x1b[34mblue\x1b[0mlast'
string = 'first\x1b[34mblue\x1b[0mlast\033[33mYellow'
i = -1
for i, substring in enumerate(self.processor.split_string(string)):
if i == 0:
Expand All @@ -49,6 +49,9 @@ def test_colors(self):
elif i == 2:
self.assertEqual(substring, 'last')
self.assertEqual(self.processor.foreground_color, None)
elif i == 3:
self.assertEqual(substring, 'Yellow')
self.assertEqual(self.processor.foreground_color, 3)
else:
self.fail('Too many substrings.')
self.assertEqual(i, 2, 'Too few substrings.')
Expand Down

0 comments on commit 1c0c079

Please sign in to comment.