Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd08149

Browse files
authored
Test code branches (#108)
2 parents 60815d2 + b32a006 commit fd08149

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ max_supported_python = "3.14"
100100
testpaths = [ "tests" ]
101101

102102
[tool.coverage.run]
103+
branch = true
103104
disable_warnings = [
104105
"no-sysmon",
105106
]

tests/test_termcolor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def assert_cprint(
9393
("light_blue", "\x1b[94mtext\x1b[0m"),
9494
((1, 2, 3), "\x1b[38;2;1;2;3mtext\x1b[0m"),
9595
((100, 200, 150), "\x1b[38;2;100;200;150mtext\x1b[0m"),
96+
(000, "text\x1b[0m"), # invalid input type
9697
],
9798
)
9899
def test_color(
@@ -128,6 +129,7 @@ def test_color(
128129
("on_light_blue", "\x1b[104mtext\x1b[0m"),
129130
((1, 2, 3), "\x1b[48;2;1;2;3mtext\x1b[0m"),
130131
((100, 200, 150), "\x1b[48;2;100;200;150mtext\x1b[0m"),
132+
(000, "text\x1b[0m"), # invalid input type
131133
],
132134
)
133135
def test_on_color(

0 commit comments

Comments
 (0)