public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH 1/3] test-utils: handle import bb failing and skip the test
@ 2013-05-23 18:44 Ross Burton
  2013-05-23 18:45 ` [PATCH 2/3] test_utils: import functions directly for conciseness Ross Burton
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ross Burton @ 2013-05-23 18:44 UTC (permalink / raw)
  To: openembedded-core

Instead of reporting an error when bb cannot be imported, skip the test
instead. This makes it a lot easier to iterate a test suite when we don't care
about this particular test.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/lib/oe/tests/test_utils.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/tests/test_utils.py b/meta/lib/oe/tests/test_utils.py
index 466c47e..779247a 100644
--- a/meta/lib/oe/tests/test_utils.py
+++ b/meta/lib/oe/tests/test_utils.py
@@ -1,11 +1,15 @@
 import unittest
-import bb, oe.utils
+import oe.utils
 
 class TestPackagesFilterOutSystem(unittest.TestCase):
     def test_filter(self):
         """
         Test that oe.utils.packages_filter_out_system works.
         """
+        try:
+            import bb
+        except ImportError:
+            self.skipTest("Cannot import bb")
 
         d = bb.data_smart.DataSmart()
         d.setVar("PN", "foo")
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-30 19:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-23 18:44 [PATCH 1/3] test-utils: handle import bb failing and skip the test Ross Burton
2013-05-23 18:45 ` [PATCH 2/3] test_utils: import functions directly for conciseness Ross Burton
2013-05-23 18:45 ` [PATCH 3/3] utils: add trim_version() function Ross Burton
2013-05-23 21:16   ` Chris Larson
2013-05-30 19:49 ` [PATCH 1/3] test-utils: handle import bb failing and skip the test Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox