mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-15 03:41:16 +01:00
Updated color test
This commit is contained in:
parent
0db590bfc9
commit
0aa9bc7004
1 changed files with 15 additions and 11 deletions
|
@ -2,21 +2,25 @@ import unittest
|
||||||
from slpkg.configs import Configs
|
from slpkg.configs import Configs
|
||||||
|
|
||||||
|
|
||||||
class TestColors(unittest.TestCase):
|
class TestColors(unittest.TestCase, Configs):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
colors = Configs.colour
|
super(Configs, self).__init__()
|
||||||
self.color = colors()
|
|
||||||
|
|
||||||
def test_colors(self):
|
def test_colors(self):
|
||||||
self.assertIn('bold', self.color)
|
self.assertEqual('\033[32;5m', self.blink)
|
||||||
self.assertIn('red', self.color)
|
self.assertIn('\033[1m', self.bold)
|
||||||
self.assertIn('yellow', self.color)
|
self.assertEqual('\x1b[91m', self.red)
|
||||||
self.assertIn('cyan', self.color)
|
self.assertEqual('\033[1m\x1b[91m', self.bred)
|
||||||
self.assertIn('green', self.color)
|
self.assertEqual('\x1b[32m', self.green)
|
||||||
self.assertIn('blue', self.color)
|
self.assertEqual('\033[1m\x1b[32m', self.bgreen)
|
||||||
self.assertIn('grey', self.color)
|
self.assertEqual('\x1b[93m', self.yellow)
|
||||||
self.assertIn('endc', self.color)
|
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)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in a new issue