commit:     f1e0de88935f7374be100e3d408ed065f4095846
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  2 12:40:25 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 14 05:21:53 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1e0de88

python-utils-r1.eclass: epytest, use NO_COLOR rather than NOCOLOR

Update epytest to respect the modern NO_COLOR variable rather than
Portage's old NOCOLOR.  Adjust it to correctly check whether it is set
at all rather than to a specific value, to match the behavior of pytest
itself.

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/python-utils-r1.eclass | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 394f64a5d139..da9cb820840f 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1336,15 +1336,8 @@ epytest() {
        _python_check_EPYTHON
        _python_check_occluded_packages
 
-       local color
-       case ${NOCOLOR} in
-               true|yes)
-                       color=no
-                       ;;
-               *)
-                       color=yes
-                       ;;
-       esac
+       local color=yes
+       [[ ${NO_COLOR} ]] && color=no
 
        local args=(
                # verbose progress reporting and tracebacks

Reply via email to