test_colored()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 3
c 1
b 0
f 1
dl 0
loc 4
ccs 4
cts 4
cp 1
crap 3
rs 10
1 1
import Rewatcher
2
3 1
def test_colored():
4 1
    str = 'test string'
5 1
    assert str == Rewatcher.colored(str, 'yellow', False)
6
    assert '\033[93m' + str + '\033[0m' == Rewatcher.colored(str, 'yellow', True)
7