All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chris Laplante" <chris.laplante@agilent.com>
To: <bitbake-devel@lists.openembedded.org>
Cc: Chris Laplante <chris.laplante@agilent.com>
Subject: [PATCH v3 10/10] tests/arg_parser: add test for default TinfoilConfigParameters 'ui'
Date: Sun, 8 Nov 2020 17:10:59 -0500	[thread overview]
Message-ID: <20201108221059.16854-11-chris.laplante@agilent.com> (raw)
In-Reply-To: <20201108221059.16854-1-chris.laplante@agilent.com>

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
---
 lib/bb/tests/arg_parser.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/bb/tests/arg_parser.py b/lib/bb/tests/arg_parser.py
index be2d86fa..73264066 100644
--- a/lib/bb/tests/arg_parser.py
+++ b/lib/bb/tests/arg_parser.py
@@ -9,9 +9,11 @@
 
 import collections
 import shlex
+import types
 import unittest
 
 from bb.main import create_bitbake_parser, BitBakeConfigParameters, LazyUiChoices
+from bb.tinfoil import TinfoilConfigParameters
 
 ParseResult = collections.namedtuple("ParseResult", ("options", "targets"))
 
@@ -53,3 +55,8 @@ class ArgParserTests(unittest.TestCase):
         ui_action = ui_actions[0]
         self.assertIs(type(ui_action.type), LazyUiChoices, "'ui' action has wrong type")
         self.assertFalse(ui_action.type.has_loaded_modules, "Creation of the arg parser loaded the bb.ui modules")
+
+    def test_tinfoil_default_ui_arg(self):
+        # Ensure the default 'ui' parameter is a module, not a str
+        params = TinfoilConfigParameters(config_only=True)
+        self.assertIs(type(params.ui), types.ModuleType)
-- 
2.17.1


  parent reply	other threads:[~2020-11-08 22:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-08 22:10 [PATCH v3 00/10] optparse => argparse Chris Laplante
2020-11-08 22:10 ` [PATCH v3 01/10] cookerdata: tweak to avoid mutable default argument Chris Laplante
2020-11-08 22:10 ` [PATCH v3 02/10] tests/arg_parser: add stub for testing arg parsing Chris Laplante
2020-11-08 22:10 ` [PATCH v3 03/10] tests/arg_parser: add test for 'bitbake -S none world' Chris Laplante
2020-11-08 22:10 ` [PATCH v3 04/10] main: migrate from optparse to argparse Chris Laplante
2020-11-08 22:10 ` [PATCH v3 05/10] main: group --help options to make them easier to read Chris Laplante
2020-11-08 22:10 ` [PATCH v3 06/10] main: rename list_extension_modules => load_extension_modules to clarify its function Chris Laplante
2020-11-08 22:10 ` [PATCH v3 07/10] tests/arg_parser: add test for lazy loading of bb.ui modules Chris Laplante
2020-11-08 22:10 ` [PATCH v3 08/10] main: fix parsing of intermixed arguments Chris Laplante
2020-11-08 22:10 ` [PATCH v3 09/10] tinfoil: use knotty module itself as default 'ui' arg to keep up with changes in setup_bitbake Chris Laplante
2020-11-08 22:10 ` Chris Laplante [this message]
2020-11-10 21:33 ` [bitbake-devel] [PATCH v3 00/10] optparse => argparse Richard Purdie
2020-11-10 21:36   ` Chris Laplante
2020-11-10 21:38 ` Richard Purdie
2020-11-10 21:40   ` Chris Laplante
2020-11-18 16:37   ` Chris Laplante
2020-11-18 16:44     ` Richard Purdie
2020-11-18 17:07       ` Chris Laplante
2020-11-18 17:24         ` Richard Purdie
2020-11-18 21:01           ` Chris Laplante
2020-11-20 11:17             ` Richard Purdie
     [not found]       ` <1648A9226B93C86E.28066@lists.openembedded.org>
2020-11-18 17:08         ` Chris Laplante

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=20201108221059.16854-11-chris.laplante@agilent.com \
    --to=chris.laplante@agilent.com \
    --cc=bitbake-devel@lists.openembedded.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.