public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/emerge/
Date: Mon, 30 Oct 2023 03:14:28 +0000 (UTC)	[thread overview]
Message-ID: <1698635661.f294d967ec63c62caaa9f4d68b9c26acd1b1c95e.sam@gentoo> (raw)

commit:     f294d967ec63c62caaa9f4d68b9c26acd1b1c95e
Author:     David Palao <david.palao <AT> gmail <DOT> com>
AuthorDate: Fri Jun  9 14:43:24 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <david.palao <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> 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):


             reply	other threads:[~2023-10-30  3:14 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-30  3:14 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-02-25  8:25 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/emerge/ Sam James
2024-02-24  3:36 Zac Medico
2024-01-03 19:59 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-10-30  3:14 Sam James
2023-05-26 15:45 Sam James
2023-05-26 15:45 Sam James
2022-09-25 19:12 Mike Gilbert
2021-01-18 12:20 Zac Medico
2020-10-17  9:21 Zac Medico
2020-10-12 18:03 Zac Medico
2020-08-03 23:28 Zac Medico
2020-08-03 19:30 Zac Medico
2020-03-08 22:29 Zac Medico
2020-03-08  7:33 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1698635661.f294d967ec63c62caaa9f4d68b9c26acd1b1c95e.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox