test_styles.py 519 B

123456789101112131415
  1. import unittest
  2. from qtconsole.styles import dark_color, dark_style
  3. class TestStyles(unittest.TestCase):
  4. def test_dark_color(self):
  5. self.assertTrue(dark_color('#000000')) # black
  6. self.assertTrue(not dark_color('#ffff66')) # bright yellow
  7. self.assertTrue(dark_color('#80807f')) # < 50% gray
  8. self.assertTrue(not dark_color('#808080')) # = 50% gray
  9. def test_dark_style(self):
  10. self.assertTrue(dark_style('monokai'))
  11. self.assertTrue(not dark_style('default'))