8000 Add test cases · python/cpython@a738098 · GitHub
[go: up one dir, main page]

Skip to content

Commit a738098

Browse files
committed
Add test cases
1 parent ec36e22 commit a738098

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Lib/test/test__colorize.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,15 @@ def test_colorized_detection_checks_for_environment_variables(self):
4545

4646
for env_vars, expected in [
4747
({"TERM": "dumb"}, False),
48+
({"TERM": "dumb", "FORCE_COLOR": "1"}, True),
49+
({"PYTHON_COLORS": "true"}, True),
50+
({"PYTHON_COLORS": "2"}, True),
4851
({"PYTHON_COLORS": "1"}, True),
4952
({"PYTHON_COLORS": "0"}, False),
53+
({"PYTHON_COLORS": ""}, True),
5054
({"NO_COLOR": "1"}, False),
5155
({"NO_COLOR": "0"}, False),
56+
({"NO_COLOR": ""}, True),
5257
({"NO_COLOR": "1", "PYTHON_COLORS": "1"}, True),
5358
({"FORCE_COLOR": "1"}, True),
5459
({"FORCE_COLOR": "1", "NO_COLOR": "1"}, False),

0 commit comments

Comments
 (0)
0