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 E7C28158089 for ; Mon, 30 Oct 2023 03:14:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ED74E2BC01B; Mon, 30 Oct 2023 03:14:30 +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 D08EA2BC01B for ; Mon, 30 Oct 2023 03:14:30 +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 B0BF1335C29 for ; Mon, 30 Oct 2023 03:14:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2596F11BA for ; Mon, 30 Oct 2023 03:14:28 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1698635661.f294d967ec63c62caaa9f4d68b9c26acd1b1c95e.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/emerge/ X-VCS-Repository: proj/portage X-VCS-Files: lib/portage/tests/emerge/test_simple.py X-VCS-Directories: lib/portage/tests/emerge/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f294d967ec63c62caaa9f4d68b9c26acd1b1c95e X-VCS-Branch: master Date: Mon, 30 Oct 2023 03:14:28 +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: 9ba146ce-1279-4936-bc6c-f28c5781b5b6 X-Archives-Hash: 8d36977aa9f93fe42db53e427734344d commit: f294d967ec63c62caaa9f4d68b9c26acd1b1c95e Author: David Palao gmail com> AuthorDate: Fri Jun 9 14:43:24 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Oct 30 03:14:21 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=f294d967 tests/emerge/test_simple.py: pytest: introduce binpkg_format param Signed-off-by: David Palao gmail.com> Signed-off-by: Sam James gentoo.org> lib/portage/tests/emerge/test_simple.py | 38 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/lib/portage/tests/emerge/test_simple.py b/lib/portage/tests/emerge/test_simple.py index ee95ef65e5..1c7d1bafbe 100644 --- a/lib/portage/tests/emerge/test_simple.py +++ b/lib/portage/tests/emerge/test_simple.py @@ -3,7 +3,8 @@ import argparse import subprocess -import sys + +import pytest import portage from portage import shutil, os @@ -21,7 +22,6 @@ from portage.tests.resolver.ResolverPlayground import ResolverPlayground from portage.tests.util.test_socks5 import AsyncHTTPServer from portage.util import ensure_dirs, find_updated_config_files, shlex_split from portage.util.futures import asyncio -from portage.output import colorize _INSTALL_SOMETHING = """ @@ -223,26 +223,24 @@ class BinhostContentMap(Mapping): raise KeyError(request_path) -def test_simple_emerge(): - debug = False - - for binpkg_format in SUPPORTED_GENTOO_BINPKG_FORMATS: - playground = ResolverPlayground( - ebuilds=_AVAILABLE_EBUILDS, - installed=_INSTALLED_EBUILDS, - debug=debug, - user_config={ - "make.conf": (f'BINPKG_FORMAT="{binpkg_format}"',), - }, - ) +@pytest.mark.parametrize("binpkg_format", SUPPORTED_GENTOO_BINPKG_FORMATS) +def test_simple_emerge(binpkg_format): + playground = ResolverPlayground( + ebuilds=_AVAILABLE_EBUILDS, + installed=_INSTALLED_EBUILDS, + debug=False, + user_config={ + "make.conf": (f'BINPKG_FORMAT="{binpkg_format}"',), + }, + ) - loop = asyncio._wrap_loop() - loop.run_until_complete( - asyncio.ensure_future( - _async_test_simple(playground, _METADATA_XML_FILES, loop=loop), - loop=loop, - ) + loop = asyncio._wrap_loop() + loop.run_until_complete( + asyncio.ensure_future( + _async_test_simple(playground, _METADATA_XML_FILES, loop=loop), + loop=loop, ) + ) async def _async_test_simple(playground, metadata_xml_files, loop):