mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Test: Fixed test to contain expected colors
- Problem was that Linux has been upgrading 16-color output, and the test was based on observed output, which looks correct, but actually isn't. We may end up marking these tests as expeected to fail, because they are not important.
This commit is contained in:
parent
c1e86f59e2
commit
499b2256fc
1 changed files with 4 additions and 8 deletions
|
@ -232,19 +232,15 @@ class TestColorRulesMerging(TestCase):
|
|||
|
||||
def test_colors_merge(self):
|
||||
"""Tests whether colors merge"""
|
||||
code, out, err = self.t('hometask')
|
||||
|
||||
self.assertIn('\x1b[38;5;160', out) # Red foreground applied
|
||||
self.assertIn('\x1b[48;5;7', out) # White background applied
|
||||
code, out, err = self.t('1 info')
|
||||
self.assertIn('\x1b[31;47mhometask', out) # Red on white
|
||||
|
||||
def test_colors_merge_off(self):
|
||||
"""No color merge behaviour with rule.color.merge=no"""
|
||||
self.t.config('rule.color.merge', 'no')
|
||||
|
||||
code, out, err = self.t('hometask')
|
||||
|
||||
self.assertIn('\x1b[38;5;160', out) # Red foreground applied
|
||||
self.assertNotIn('\x1b[48;5;7', out) # White background not applied
|
||||
code, out, err = self.t('1 info')
|
||||
self.assertIn('\x1b[31mhometask', out) # Red
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue