From 499b2256fcb1c9083da989b9acb4809b4801d5da Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 6 Sep 2015 12:31:50 -0400 Subject: [PATCH] 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. --- test/color.rules.t | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/color.rules.t b/test/color.rules.t index cbc315eae..e77943b39 100755 --- a/test/color.rules.t +++ b/test/color.rules.t @@ -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__":