aboutsummaryrefslogtreecommitdiff
path: root/docs/devel/testing.rst
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2023-11-14 15:48:31 +0100
committerThomas Huth <thuth@redhat.com>2023-11-16 07:13:41 +0100
commitf0a663b4ced2bf315936c774c2b6ff398fce8905 (patch)
treee5c0cf41c9a244f0517faec90b837cdeadc72172 /docs/devel/testing.rst
parent861f724d03e1748cda1c5b9ec8457a368590cbd5 (diff)
downloadqemu-f0a663b4ced2bf315936c774c2b6ff398fce8905.zip
qemu-f0a663b4ced2bf315936c774c2b6ff398fce8905.tar.gz
qemu-f0a663b4ced2bf315936c774c2b6ff398fce8905.tar.bz2
tests/avocado: Replace assertRegexpMatches() for Python 3.12 compatibility
assertRegexpMatches() has been removed in Python 3.12 and should be replaced by assertRegex(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3 Inspired-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231114144832.71612-1-philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'docs/devel/testing.rst')
-rw-r--r--docs/devel/testing.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index 87ed30a..22218db 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -1016,7 +1016,7 @@ class. Here's a simple usage example:
self.vm.launch()
res = self.vm.cmd('human-monitor-command',
command_line='info version')
- self.assertRegexpMatches(res, r'^(\d+\.\d+\.\d)')
+ self.assertRegex(res, r'^(\d+\.\d+\.\d)')
To execute your test, run: