HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/Lib/site-packages/qtconsole/tests/test_styles.py
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'))