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 aa87982 commit c67af4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions imgconverter/qubesimgconverter/test_integ.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def create_img(self, filename):
self.skipTest('failed to create test image: {}'.format(stdout))

def assertCorrectlyTransformed(self, orig_filename, trusted_filename):
self.assertEquals(
self.assertEqual(
self.vm.run('test -r "{}"'.format(trusted_filename), wait=True), 0)
self.assertEquals(
self.assertEqual(
self.vm.run('test -r "{}"'.format(orig_filename), wait=True), 0)
# retrieve original image too, to compensate for compression
p = self.vm.run('gm convert "{}" rgb:-'.format(orig_filename),
Expand All @@ -67,7 +67,7 @@ def assertCorrectlyTransformed(self, orig_filename, trusted_filename):
p = self.vm.run('gm convert "{}" rgb:-'.format(trusted_filename),
passio_popen=True)
trusted_image_data, _ = p.communicate()
self.assertEquals(orig_image_data, trusted_image_data)
self.assertEqual(orig_image_data, trusted_image_data)

def test_000_png(self):
self.create_img('test.png')
Expand All @@ -76,7 +76,7 @@ def test_000_png(self):
(stdout, _) = p.communicate()
if p.returncode == 127:
self.skipTest('qubes-img-converter not installed')
self.assertEquals(p.returncode, 0, 'qvm-convert-img failed: {}'.format(
self.assertEqual(p.returncode, 0, 'qvm-convert-img failed: {}'.format(
stdout))
self.assertCorrectlyTransformed('test.png', 'trusted.png')

Expand All @@ -88,7 +88,7 @@ def test_010_filename_with_spaces(self):
(stdout, _) = p.communicate()
if p.returncode == 127:
self.skipTest('qubes-img-converter not installed')
self.assertEquals(p.returncode, 0, 'qvm-convert-img failed: {}'.format(
self.assertEqual(p.returncode, 0, 'qvm-convert-img failed: {}'.format(
stdout))
self.assertCorrectlyTransformed(
'test with spaces.png', 'trusted with spaces.png')
Expand Down

0 comments on commit c67af4e

Please sign in to comment.