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") d.setVar("PACKAGES", "foo foo-doc foo-dev") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, []) d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, ["foo-data"]) d.setVar("PACKAGES", "foo foo-locale-en-gb") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, []) d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, ["foo-data"])
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") d.setVar("PACKAGES", "foo foo-doc foo-dev") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, []) d.setVar("PACKAGES", "foo foo-doc foo-data foo-dev") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, ["foo-data"]) d.setVar("PACKAGES", "foo foo-locale-en-gb") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, []) d.setVar("PACKAGES", "foo foo-data foo-locale-en-gb") pkgs = packages_filter_out_system(d) self.assertEqual(pkgs, ["foo-data"])