File: test_styles.py

package info (click to toggle)
python-qtconsole 5.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,184 kB
  • sloc: python: 7,222; makefile: 180; sh: 36
file content (15 lines) | stat: -rw-r--r-- 519 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import unittest

from qtconsole.styles import dark_color, dark_style


class TestStyles(unittest.TestCase):
    def test_dark_color(self):
        self.assertTrue(dark_color('#000000'))  # black
        self.assertTrue(not dark_color('#ffff66'))  # bright yellow
        self.assertTrue(dark_color('#80807f'))  # < 50% gray
        self.assertTrue(not dark_color('#808080'))  # = 50% gray

    def test_dark_style(self):
        self.assertTrue(dark_style('monokai'))
        self.assertTrue(not dark_style('default'))