diff options
| author | Ross Burton <ross.burton@arm.com> | 2024-02-07 16:40:22 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-09-27 05:57:35 -0700 |
| commit | 5088e79244daeecca66a3c5edd3a6bb67809ae52 (patch) | |
| tree | 02a99dc3207878b298f343c03f2fbcc793321bdc /meta/lib/oeqa/selftest/cases | |
| parent | 504f20398641e53f7193bbfefb1eff5f2d459fe6 (diff) | |
| download | poky-5088e79244daeecca66a3c5edd3a6bb67809ae52.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: ff720f337e40761c7d4d544c963cf518ad5403ad)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6df44a4b29487bf8ef51bb5ba6467a4056b749cc)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
| -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 e9612389fe..e423fe3d3e 100644 --- a/meta/lib/oeqa/selftest/cases/runcmd.py +++ b/meta/lib/oeqa/selftest/cases/runcmd.py | |||
| @@ -56,11 +56,11 @@ class RunCmdTests(OESelftestTestCase): | |||
| 56 | self.assertEqual(result.status, 0) | 56 | self.assertEqual(result.status, 0) |
| 57 | 57 | ||
| 58 | def test_result_assertion(self): | 58 | def test_result_assertion(self): |
| 59 | self.assertRaisesRegexp(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", | 59 | self.assertRaisesRegex(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", |
| 60 | runCmd, "echo foobar >&2; false", shell=True) | 60 | runCmd, "echo foobar >&2; false", shell=True) |
| 61 | 61 | ||
| 62 | def test_result_exception(self): | 62 | def test_result_exception(self): |
| 63 | self.assertRaisesRegexp(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", | 63 | self.assertRaisesRegex(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", |
| 64 | runCmd, "echo foobar >&2; false", shell=True, assert_error=False) | 64 | runCmd, "echo foobar >&2; false", shell=True, assert_error=False) |
| 65 | 65 | ||
| 66 | def test_output(self): | 66 | def test_output(self): |
