Skip to contentSkip to conversation

lib/oeqa: rename assertRaisesRegexp to assertRaisesRegex

PATCH New [email protected] 1 participant 1 message Feb 7, 2024

lore
Share & tools
lore
#0 lore raw

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.

---
 meta/lib/oeqa/selftest/cases/runcmd.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/lib/oeqa/selftest/cases/runcmd.py +2 -2
index 6fd96b84850..70047ca0caa 100644
@@ -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