2022-06-21 18:00:05 +02:00
|
|
|
import unittest
|
|
|
|
from slpkg.configs import Configs
|
|
|
|
|
|
|
|
|
2023-04-25 10:21:12 +02:00
|
|
|
class TestColors(unittest.TestCase, Configs):
|
2022-06-21 18:00:05 +02:00
|
|
|
|
|
|
|
def setUp(self):
|
2023-04-25 10:21:12 +02:00
|
|
|
super(Configs, self).__init__()
|
2022-06-21 18:00:05 +02:00
|
|
|
|
|
|
|
def test_colors(self):
|
2023-04-25 10:21:12 +02:00
|
|
|
self.assertEqual('\033[32;5m', self.blink)
|
2023-04-25 10:21:23 +02:00
|
|
|
self.assertEqual('\033[1m', self.bold)
|
2023-04-25 10:21:12 +02:00
|
|
|
self.assertEqual('\x1b[91m', self.red)
|
|
|
|
self.assertEqual('\033[1m\x1b[91m', self.bred)
|
|
|
|
self.assertEqual('\x1b[32m', self.green)
|
|
|
|
self.assertEqual('\033[1m\x1b[32m', self.bgreen)
|
|
|
|
self.assertEqual('\x1b[93m', self.yellow)
|
|
|
|
self.assertEqual('\033[1m\x1b[93m', self.byellow)
|
|
|
|
self.assertEqual('\x1b[96m', self.cyan)
|
|
|
|
self.assertEqual('\x1b[94m', self.blue)
|
|
|
|
self.assertEqual('\x1b[38;5;247m', self.grey)
|
|
|
|
self.assertEqual('\x1b[35m', self.violet)
|
|
|
|
self.assertEqual('\x1b[0m', self.endc)
|
2022-06-21 18:00:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|