aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2022-11-19 19:21:57 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2022-11-19 19:21:57 +0200
commitf9c6971a98ed76679e97e08ec25c4ab560921d21 (patch)
tree4e1edb728b594d946789c95bf6ab6781db53d91d /tests
parentcli: add support for NOCOLOR to disable colors (diff)
downloadpkgdev-f9c6971a98ed76679e97e08ec25c4ab560921d21.tar.gz
pkgdev-f9c6971a98ed76679e97e08ec25c4ab560921d21.tar.bz2
pkgdev-f9c6971a98ed76679e97e08ec25c4ab560921d21.zip
tests/scripts/test_pkgdev_showkw.py: fix NOCOLOR test
Fix the test for systems which predefine NOCOLOR, like in case of ebuild test environment (by epytest). Follows: 9714e4785e1ffc56a08f042011b5a966c7520a1f Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/test_pkgdev_showkw.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/scripts/test_pkgdev_showkw.py b/tests/scripts/test_pkgdev_showkw.py
index fe06be9..c611484 100644
--- a/tests/scripts/test_pkgdev_showkw.py
+++ b/tests/scripts/test_pkgdev_showkw.py
@@ -50,7 +50,8 @@ class TestPkgdevShowkwParseArgs:
'--config', str(config_file), *args])
return options
- assert parse().color is True
+ with os_environ('NOCOLOR'):
+ assert parse().color is True
with os_environ(NOCOLOR='1'):
# NOCOLOR overrides config file
assert parse().color is False