File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -290,10 +290,10 @@ def add_color_flags(parser: ArgumentParser) -> None:
290
290
converter = StrConvert ()
291
291
if converter .to_bool (os .environ .get ("NO_COLOR" , "" )):
292
292
color = "no"
293
- elif os .environ .get ("TERM" , "" ) == "dumb" :
294
- color = "no"
295
293
elif converter .to_bool (os .environ .get ("FORCE_COLOR" , "" )):
296
294
color = "yes"
295
+ elif os .environ .get ("TERM" , "" ) == "dumb" :
296
+ color = "no"
297
297
else :
298
298
color = "yes" if sys .stdout .isatty () else "no"
299
299
Original file line number Diff line number Diff line change @@ -54,14 +54,14 @@ def test_parser_color(
54
54
stdout_mock = mocker .patch ("tox.config.cli.parser.sys.stdout" )
55
55
stdout_mock .isatty .return_value = is_atty
56
56
57
- if term == "dumb" :
58
- expected = False
59
- elif tox_color in ("yes" , "no" ):
57
+ if tox_color in ("yes" , "no" ):
60
58
expected = tox_color == "yes"
61
59
elif no_color == "1" :
62
60
expected = False
63
61
elif force_color == "1" :
64
62
expected = True
63
+ elif term == "dumb" :
64
+ expected = False
65
65
else :
66
66
expected = is_atty
67
67
You can’t perform that action at this time.
0 commit comments