From c6b15f15ca9ca576f232c9f2843f73708dcd9790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 21 Aug 2024 15:00:52 +0200 Subject: [PATCH] tests: assertEquals -> assertEqual The former is removed in Python 3.13 QubesOS/qubes-issues#9402 --- qubes/tests/integ/devices_block.py | 8 ++++---- qubes/tests/integ/dispvm.py | 2 +- qubes/tests/integ/vm_qrexec_gui.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qubes/tests/integ/devices_block.py b/qubes/tests/integ/devices_block.py index 74e60b4ae..e3d17b73b 100644 --- a/qubes/tests/integ/devices_block.py +++ b/qubes/tests/integ/devices_block.py @@ -132,7 +132,7 @@ def test_010_list_dm(self): found = False for dev in dev_list: if dev.ident.startswith('loop'): - self.assertNotEquals(dev.serial, self.img_path, + self.assertNotEqual(dev.serial, self.img_path, "Device {} ({}) should not be listed as it is used in " "device-mapper".format(dev, self.img_path) ) @@ -163,12 +163,12 @@ def test_011_list_dm_mounted(self): dev_list = list(self.vm.devices['block']) for dev in dev_list: if dev.ident.startswith('loop'): - self.assertNotEquals(dev.serial, self.img_path, + self.assertNotEqual(dev.serial, self.img_path, "Device {} ({}) should not be listed as it is used in " "device-mapper".format(dev, self.img_path) ) else: - self.assertNotEquals(dev.serial, 'test-dm', + self.assertNotEqual(dev.serial, 'test-dm', "Device {} ({}) should not be listed as it is " "mounted".format(dev, 'test-dm') ) @@ -188,7 +188,7 @@ def test_012_list_dm_delayed(self): found = False for dev in dev_list: if dev.ident.startswith('loop'): - self.assertNotEquals(dev.serial, self.img_path, + self.assertNotEqual(dev.serial, self.img_path, "Device {} ({}) should not be listed as it is used in " "device-mapper".format(dev, self.img_path) ) diff --git a/qubes/tests/integ/dispvm.py b/qubes/tests/integ/dispvm.py index 196f04cc2..a87ab7f2b 100644 --- a/qubes/tests/integ/dispvm.py +++ b/qubes/tests/integ/dispvm.py @@ -108,7 +108,7 @@ def test_003_cleanup_destroyed(self): lines = lines_task.result().splitlines() self.assertTrue(lines, 'No output received from DispVM') dispvm_name = lines[0] - self.assertNotEquals(dispvm_name, b"ERROR") + self.assertNotEqual(dispvm_name, b"ERROR") self.assertNotIn(dispvm_name, self.app.domains) diff --git a/qubes/tests/integ/vm_qrexec_gui.py b/qubes/tests/integ/vm_qrexec_gui.py index 1b0bda315..4493fe55e 100644 --- a/qubes/tests/integ/vm_qrexec_gui.py +++ b/qubes/tests/integ/vm_qrexec_gui.py @@ -473,10 +473,10 @@ def test_210_time_sync(self): # get current time current_time, _ = self.loop.run_until_complete( self.testvm1.run_for_stdio('date -u +%s')) - self.assertAlmostEquals(int(vm_time), int(current_time), delta=30) + self.assertAlmostEqual(int(vm_time), int(current_time), delta=30) dom0_time = subprocess.check_output(['date', '-u', '+%s']) - self.assertAlmostEquals(int(dom0_time), int(current_time), delta=30) + self.assertAlmostEqual(int(dom0_time), int(current_time), delta=30) except: # reset time to some approximation of the real time