From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/5] oe-selftest: replace assertTrue(False, ...) with fail(...)
Date: Thu, 20 Aug 2015 09:31:57 +0100 [thread overview]
Message-ID: <d5b584748fbfb60c8be339bd71b300ca3a4cbf75.1440059460.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1440059460.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1440059460.git.paul.eggleton@linux.intel.com>
I'd somehow missed the existence of fail() when I wrote these. It's
preferable here so you don't get the somewhat useless "false is not
true" message in the case of failure.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/lib/oeqa/selftest/devtool.py | 2 +-
meta/lib/oeqa/selftest/recipetool.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/lib/oeqa/selftest/devtool.py b/meta/lib/oeqa/selftest/devtool.py
index 947d8ee..70ee634 100644
--- a/meta/lib/oeqa/selftest/devtool.py
+++ b/meta/lib/oeqa/selftest/devtool.py
@@ -51,7 +51,7 @@ class DevtoolBase(oeSelfTest):
bbappendfile = bbappend
break
else:
- self.assertTrue(False, 'bbappend for recipe %s does not seem to be created in test layer' % testrecipe)
+ self.fail('bbappend for recipe %s does not seem to be created in test layer' % testrecipe)
return bbappendfile
def _create_temp_layer(self, templayerdir, addlayer, templayername, priority=999, recipepathspec='recipes-*/*'):
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index 689d41b..c34ad68 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -282,7 +282,7 @@ class RecipetoolTests(RecipetoolBase):
self.assertIn('add-file.patch', line, 'Unexpected warning found in output:\n%s' % line)
break
else:
- self.assertTrue(False, 'Patch warning not found in output:\n%s' % output)
+ self.fail('Patch warning not found in output:\n%s' % output)
@testcase(1188)
def test_recipetool_appendfile_script(self):
@@ -351,7 +351,7 @@ class RecipetoolTests(RecipetoolBase):
bbappendfile = f
break
if not bbappendfile:
- self.assertTrue(False, 'No bbappend file created')
+ self.fail('No bbappend file created')
runCmd('rm -rf %s/recipes-*' % self.templayerdir)
return bbappendfile
--
2.1.0
next prev parent reply other threads:[~2015-08-20 8:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 8:31 [PATCH 0/5] Misc fixes Paul Eggleton
2015-08-20 8:31 ` [PATCH 1/5] scripts/create-recipe: drop Paul Eggleton
2015-08-20 8:31 ` [PATCH 2/5] classes/insane: fix QA check message referring to nativesdk Paul Eggleton
2015-08-20 8:31 ` Paul Eggleton [this message]
2015-08-20 8:31 ` [PATCH 4/5] hello-mod: drop PV and PR Paul Eggleton
2015-08-20 8:31 ` [PATCH 5/5] service: tweak example recipe Paul Eggleton
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=d5b584748fbfb60c8be339bd71b300ca3a4cbf75.1440059460.git.paul.eggleton@linux.intel.com \
--to=paul.eggleton@linux.intel.com \
--cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox