]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/core/tests: Fix test_data module tests
authorNathan Rossi <nathan@nathanrossi.com>
Tue, 3 Sep 2019 16:56:41 +0000 (16:56 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Sep 2019 07:13:40 +0000 (08:13 +0100)
These two tests relied on the context containing the results information.
This was moved into the OETestResults class.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/tests/test_data.py

index 50811bb3811d946d4452a46f15ba1e0aa387ec78..ac74098b7859f5c51869f30ca5a91102ac358319 100755 (executable)
@@ -22,8 +22,9 @@ class TestData(TestBase):
         expectedException = "oeqa.core.exception.OEQAMissingVariable"
 
         tc = self._testLoader(modules=self.modules)
-        self.assertEqual(False, tc.runTests().wasSuccessful())
-        for test, data in tc.errors:
+        results = tc.runTests()
+        self.assertFalse(results.wasSuccessful())
+        for test, data in results.errors:
             expect = False
             if expectedException in data:
                 expect = True
@@ -35,8 +36,9 @@ class TestData(TestBase):
         d = {'IMAGE' : 'core-image-sato', 'ARCH' : 'arm'}
 
         tc = self._testLoader(d=d, modules=self.modules)
-        self.assertEqual(False, tc.runTests().wasSuccessful())
-        for test, data in tc.failures:
+        results = tc.runTests()
+        self.assertFalse(results.wasSuccessful())
+        for test, data in results.failures:
             expect = False
             if expectedError in data:
                 expect = True