author | Radek Brich <radek.brich@devl.cz> |
Wed, 09 Jul 2014 17:56:05 +0200 | |
changeset 14 | 6caad95d4540 |
permissions | -rwxr-xr-x |
14 | 1 |
#!/usr/bin/env python3 |
2 |
||
3 |
from pycolib.ansicolor import highlight, names |
|
4 |
||
5 |
import unittest |
|
6 |
||
7 |
||
8 |
class TestAnsiColor(unittest.TestCase): |
|
9 |
||
10 |
def test_colors(self): |
|
11 |
for fg in range(0,8): |
|
12 |
for bg in range(0,8): |
|
13 |
print( |
|
14 |
highlight(1, fg, bg), |
|
15 |
'%10s on %-10s' % (names[fg], names[bg]), |
|
16 |
highlight(0), |
|
17 |
sep='', end='' |
|
18 |
) |
|
19 |
print() |
|
20 |
||
21 |
||
22 |
if __name__ == '__main__': |
|
23 |
unittest.main() |