diff options
author | Ross Burton <ross.burton@arm.com> | 2024-02-07 16:40:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-02-08 23:14:51 +0000 |
commit | 6f2c3b77444d162a8a755454536887dd28a7964e (patch) | |
tree | 7d5d39c4a0c00b64b1616086c848b28e18d204ab /meta | |
parent | 4a6a1a8c3c2e300de6f97787033e4263a9c0445f (diff) | |
download | poky-6f2c3b77444d162a8a755454536887dd28a7964e.tar.gz |
lib/oeqa: rename assertRaisesRegexp to assertRaisesRegex
TestCase.assertRaisesRegexp was renamed to assertRaisesRegex in Python
3.2, so rename to fix a warning during test execution.
(From OE-Core rev: 6df44a4b29487bf8ef51bb5ba6467a4056b749cc)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/runcmd.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/cases/runcmd.py b/meta/lib/oeqa/selftest/cases/runcmd.py index 6fd96b8485..70047ca0ca 100644 --- a/meta/lib/oeqa/selftest/cases/runcmd.py +++ b/meta/lib/oeqa/selftest/cases/runcmd.py | |||
@@ -58,11 +58,11 @@ class RunCmdTests(OESelftestTestCase): | |||
58 | self.assertEqual(result.status, 0) | 58 | self.assertEqual(result.status, 0) |
59 | 59 | ||
60 | def test_result_assertion(self): | 60 | def test_result_assertion(self): |
61 | self.assertRaisesRegexp(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", | 61 | self.assertRaisesRegex(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", |
62 | runCmd, "echo foobar >&2; false", shell=True) | 62 | runCmd, "echo foobar >&2; false", shell=True) |
63 | 63 | ||
64 | def test_result_exception(self): | 64 | def test_result_exception(self): |
65 | self.assertRaisesRegexp(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", | 65 | self.assertRaisesRegex(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", |
66 | runCmd, "echo foobar >&2; false", shell=True, assert_error=False) | 66 | runCmd, "echo foobar >&2; false", shell=True, assert_error=False) |
67 | 67 | ||
68 | def test_output(self): | 68 | def test_output(self): |