Skip to content

Commit

Permalink
tests: assertEquals -> assertEqual
Browse files Browse the repository at this point in the history
The former is removed in Python 3.13

QubesOS/qubes-issues#9402
  • Loading branch information
marmarek committed Aug 21, 2024
1 parent 763ded4 commit c6b15f1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions qubes/tests/integ/devices_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down Expand Up @@ -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')
)
Expand All @@ -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)
)
Expand Down
2 changes: 1 addition & 1 deletion qubes/tests/integ/dispvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions qubes/tests/integ/vm_qrexec_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6b15f1

Please sign in to comment.