[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/10] tests/avocado/mem-addr-space-check: Replace assertEquals()
|
From: |
Thomas Huth |
|
Subject: |
[PULL 08/10] tests/avocado/mem-addr-space-check: Replace assertEquals() for Python 3.12 |
|
Date: |
Thu, 16 Nov 2023 19:05:32 +0100 |
assertEquals() has been removed in Python 3.12 and should be replaced by
assertEqual(). See: https://docs.python.org/3.12/whatsnew/3.12.html#id3
Message-ID: <20231116061956.14676-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Ani Sinha <anisinha@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/avocado/mem-addr-space-check.py | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/avocado/mem-addr-space-check.py
b/tests/avocado/mem-addr-space-check.py
index be949222a4..363c3f12a6 100644
--- a/tests/avocado/mem-addr-space-check.py
+++ b/tests/avocado/mem-addr-space-check.py
@@ -49,7 +49,7 @@ def test_phybits_low_pse36(self):
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
- self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be 1")
+ self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(), r'phys-bits too low')
def test_phybits_low_pae(self):
@@ -69,7 +69,7 @@ def test_phybits_low_pae(self):
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
- self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be 1")
+ self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(), r'phys-bits too low')
def test_phybits_ok_pentium_pse36(self):
@@ -149,7 +149,7 @@ def test_phybits_low_nonpse36(self):
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
- self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be 1")
+ self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(), r'phys-bits too low')
# now lets test some 64-bit CPU cases.
@@ -179,7 +179,7 @@ def test_phybits_low_tcg_q35_70_amd(self):
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
- self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be 1")
+ self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(), r'phys-bits too low')
def test_phybits_low_tcg_q35_71_amd(self):
@@ -202,7 +202,7 @@ def test_phybits_low_tcg_q35_71_amd(self):
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
- self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be 1")
+ self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(), r'phys-bits too low')
def test_phybits_ok_tcg_q35_70_amd(self):
@@ -288,7 +288,7 @@ def test_phybits_low_tcg_q35_71_amd_41bits(self):
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
- self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be 1")
+ self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(), r'phys-bits too low')
def test_phybits_ok_tcg_q35_71_amd_41bits(self):
@@ -332,7 +332,7 @@ def test_phybits_low_tcg_q35_intel_cxl(self):
self.vm.set_qmp_monitor(enabled=False)
self.vm.launch()
self.vm.wait()
- self.assertEquals(self.vm.exitcode(), 1, "QEMU exit code should be 1")
+ self.assertEqual(self.vm.exitcode(), 1, "QEMU exit code should be 1")
self.assertRegex(self.vm.get_log(), r'phys-bits too low')
def test_phybits_ok_tcg_q35_intel_cxl(self):
--
2.41.0
- [PULL 00/10] Avocado test fixes, Thomas Huth, 2023/11/16
- [PULL 01/10] tests/avocado: Replace assertEquals() for Python 3.12 compatibility, Thomas Huth, 2023/11/16
- [PULL 05/10] tests/avocado/multiprocess: Add asset hashes to silence warnings, Thomas Huth, 2023/11/16
- [PULL 03/10] tests/avocado/virtio-gpu: Fix test_vhost_user_vga_virgl for edid support, Thomas Huth, 2023/11/16
- [PULL 02/10] tests/avocado: Replace assertRegexpMatches() for Python 3.12 compatibility, Thomas Huth, 2023/11/16
- [PULL 07/10] tests/avocado/replay_kernel: Mark the test_x86_64_pc as flaky, Thomas Huth, 2023/11/16
- [PULL 06/10] tests/avocado: Make fetch_asset() unconditionally require a crypto hash, Thomas Huth, 2023/11/16
- [PULL 09/10] tests/avocado: reverse_debugging drain console to prevent hang, Thomas Huth, 2023/11/16
- [PULL 04/10] tests/avocado/intel_iommu: Add asset hashes to avoid warnings, Thomas Huth, 2023/11/16
- [PULL 08/10] tests/avocado/mem-addr-space-check: Replace assertEquals() for Python 3.12,
Thomas Huth <=
- [PULL 10/10] tests/avocado: Enable reverse_debugging.py tests in gitlab CI, Thomas Huth, 2023/11/16
- Re: [PULL 00/10] Avocado test fixes, Stefan Hajnoczi, 2023/11/20