[OE-core] [PATCH 1/3] test-utils: handle import bb failing and skip the test
Ross Burton
ross.burton at intel.com
Thu May 23 18:44:59 UTC 2013
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 at 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
More information about the Openembedded-core
mailing list