From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1CCA9158020 for ; Sat, 19 Nov 2022 17:20:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 44A18E0971; Sat, 19 Nov 2022 17:20:06 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26B53E0971 for ; Sat, 19 Nov 2022 17:20:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2C04F34121A for ; Sat, 19 Nov 2022 17:20:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 55912755 for ; Sat, 19 Nov 2022 17:20:02 +0000 (UTC) From: "Arthur Zamarin" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arthur Zamarin" Message-ID: <1668878329.d847af4232d5c7ac3965a493732a9d9fd76a37e5.arthurzam@gentoo> Subject: [gentoo-commits] proj/pkgcore/pkgcheck:master commit in: tests/scripts/ X-VCS-Repository: proj/pkgcore/pkgcheck X-VCS-Files: tests/scripts/test_pkgcheck_scan.py X-VCS-Directories: tests/scripts/ X-VCS-Committer: arthurzam X-VCS-Committer-Name: Arthur Zamarin X-VCS-Revision: d847af4232d5c7ac3965a493732a9d9fd76a37e5 X-VCS-Branch: master Date: Sat, 19 Nov 2022 17:20:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a6de4db1-3685-4d10-b779-ea4bea3728a7 X-Archives-Hash: 596d118a33e4bb447b70399f8ae7efaa commit: d847af4232d5c7ac3965a493732a9d9fd76a37e5 Author: Arthur Zamarin gentoo org> AuthorDate: Sat Nov 19 17:18:49 2022 +0000 Commit: Arthur Zamarin gentoo org> CommitDate: Sat Nov 19 17:18:49 2022 +0000 URL: https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=d847af42 tests/scripts/test_pkgcheck_scan.py: fix NOCOLOR test Fix the test for systems which predefine NOCOLOR, like in case of ebuild test environment (by epytest). Follows: d77990efa1b8a2151471e8e112b36b048b25ea54 Signed-off-by: Arthur Zamarin gentoo.org> tests/scripts/test_pkgcheck_scan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/scripts/test_pkgcheck_scan.py b/tests/scripts/test_pkgcheck_scan.py index 6c1600f8..c224d83a 100644 --- a/tests/scripts/test_pkgcheck_scan.py +++ b/tests/scripts/test_pkgcheck_scan.py @@ -271,7 +271,8 @@ class TestPkgcheckScanParseArgs: ''')) args = ('scan', '--config', str(config_file)) - assert parser.parse_args(args).color is True + with os_environ('NOCOLOR'): + assert parser.parse_args(args).color is True with os_environ(NOCOLOR='1'): # NOCOLOR overrides config file assert parser.parse_args(args).color is False