diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/oelib/utils.py')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/oelib/utils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/oelib/utils.py b/meta/lib/oeqa/selftest/cases/oelib/utils.py index a7214beb4c..0cb46425a0 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/utils.py +++ b/meta/lib/oeqa/selftest/cases/oelib/utils.py | |||
@@ -1,4 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Copyright OpenEmbedded Contributors | ||
3 | # | ||
2 | # SPDX-License-Identifier: MIT | 4 | # SPDX-License-Identifier: MIT |
3 | # | 5 | # |
4 | 6 | ||
@@ -64,7 +66,7 @@ class TestMultiprocessLaunch(TestCase): | |||
64 | import bb | 66 | import bb |
65 | 67 | ||
66 | def testfunction(item, d): | 68 | def testfunction(item, d): |
67 | if item == "2" or item == "1": | 69 | if item == "2": |
68 | raise KeyError("Invalid number %s" % item) | 70 | raise KeyError("Invalid number %s" % item) |
69 | return "Found %s" % item | 71 | return "Found %s" % item |
70 | 72 | ||
@@ -99,5 +101,4 @@ class TestMultiprocessLaunch(TestCase): | |||
99 | # Assert the function prints exceptions | 101 | # Assert the function prints exceptions |
100 | with captured_output() as (out, err): | 102 | with captured_output() as (out, err): |
101 | self.assertRaises(bb.BBHandledException, multiprocess_launch, testfunction, ["1", "2", "3", "4", "5", "6"], d, extraargs=(d,)) | 103 | self.assertRaises(bb.BBHandledException, multiprocess_launch, testfunction, ["1", "2", "3", "4", "5", "6"], d, extraargs=(d,)) |
102 | self.assertIn("KeyError: 'Invalid number 1'", out.getvalue()) | ||
103 | self.assertIn("KeyError: 'Invalid number 2'", out.getvalue()) | 104 | self.assertIn("KeyError: 'Invalid number 2'", out.getvalue()) |