Lines 279-290
class TestPkgcheckScanParseArgs:
Link Here
|
279 |
) |
279 |
) |
280 |
|
280 |
|
281 |
args = ("scan", "--config", str(config_file)) |
281 |
args = ("scan", "--config", str(config_file)) |
282 |
with os_environ("NOCOLOR"): |
282 |
with os_environ("NO_COLOR"): |
283 |
assert parser.parse_args(args).color is True |
283 |
assert parser.parse_args(args).color is True |
284 |
with os_environ(NOCOLOR="1"): |
284 |
with os_environ(NO_COLOR="1"): |
285 |
# NOCOLOR overrides config file |
285 |
# NO_COLOR overrides config file |
286 |
assert parser.parse_args(args).color is False |
286 |
assert parser.parse_args(args).color is False |
287 |
# cmd line option overrides NOCOLOR |
287 |
# cmd line option overrides NO_COLOR |
288 |
assert parser.parse_args([*args, "--color", "n"]).color is False |
288 |
assert parser.parse_args([*args, "--color", "n"]).color is False |
289 |
assert parser.parse_args([*args, "--color", "y"]).color is True |
289 |
assert parser.parse_args([*args, "--color", "y"]).color is True |
290 |
|
290 |
|
291 |
- |
|
|