lib/oeqa: rename assertRaisesRegexp to assertRaisesRegex
PATCH 1/1 lib/oeqa: rename assertRaisesRegexp to assertRaisesRegex
From: Ross Burton <[email protected]>
TestCase.assertRaisesRegexp was renamed to assertRaisesRegex in Python 3.2, so rename to fix a warning during test execution.
Signed-off-by Ross Burton <[email protected]>
--- meta/lib/oeqa/selftest/cases/runcmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/runcmd.py +2 -2
@@ -58,11 +58,11 @@ class RunCmdTests(OESelftestTestCase): self.assertEqual(result.status, 0) def test_result_assertion(self): - self.assertRaisesRegexp(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", + self.assertRaisesRegex(AssertionError, "Command 'echo .* false' returned non-zero exit status 1:\nfoobar", runCmd, "echo foobar >&2; false", shell=True) def test_result_exception(self): - self.assertRaisesRegexp(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", + self.assertRaisesRegex(CommandError, "Command 'echo .* false' returned non-zero exit status 1 with output: foobar", runCmd, "echo foobar >&2; false", shell=True, assert_error=False) def test_output(self):
Signature · 1 line
2.34.1