Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test cases
  • Loading branch information
hugovk committed Jan 23, 2025
commit a7380986ff6ce1c2372469272efe8cc534801496
5 changes: 5 additions & 0 deletions Lib/test/test__colorize.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,15 @@ def test_colorized_detection_checks_for_environment_variables(self):

for env_vars, expected in [
({"TERM": "dumb"}, False),
({"TERM": "dumb", "FORCE_COLOR": "1"}, True),
({"PYTHON_COLORS": "true"}, True),
({"PYTHON_COLORS": "2"}, True),
({"PYTHON_COLORS": "1"}, True),
({"PYTHON_COLORS": "0"}, False),
({"PYTHON_COLORS": ""}, True),
({"NO_COLOR": "1"}, False),
({"NO_COLOR": "0"}, False),
({"NO_COLOR": ""}, True),
({"NO_COLOR": "1", "PYTHON_COLORS": "1"}, True),
({"FORCE_COLOR": "1"}, True),
Comment thread
hugovk marked this conversation as resolved.
Outdated
({"FORCE_COLOR": "1", "NO_COLOR": "1"}, False),
Expand Down