]> code.ossystems Code Review - openembedded-core.git/commitdiff
oe-selftest: replace assertTrue(False, ...) with fail(...)
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Wed, 5 Aug 2015 13:37:13 +0000 (14:37 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Aug 2015 22:45:20 +0000 (23:45 +0100)
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>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/devtool.py
meta/lib/oeqa/selftest/recipetool.py

index 947d8eecf1f404fdb0dd14270efcb616141c1ef8..70ee634c71cf27d50f0d01173baf834c874266b1 100644 (file)
@@ -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-*/*'):
index 689d41b740a06e33f61390318e794ca8105d83a1..c34ad688703ccd6be5038ae9efb31e2ada8646ad 100644 (file)
@@ -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