From bc36c65ae319bd36b51ecbb7fd2ff3271ba08b05 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= <holger@applied-asynchrony.com>
Date: Tue, 14 Nov 2023 18:27:18 +0100
Subject: [PATCH] update deprecated test methods for python-3.12 compatibility
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
--- a/tests/testsuite/EnvironmentManager.py
+++ b/tests/testsuite/EnvironmentManager.py
@@ -11,7 +11,7 @@ def setUp(self):
     def test_load_packages(self):
         self.em.packages = {}
         self.em.load_packages()
-        self.assertEquals(len(self.em.get_packages()), 11)
+        self.assertEqual(len(self.em.get_packages()), 11)
 
     def test_get_package(self):
         self.em.get_package('ant-cores')
--- a/tests/testsuite/VersionManager.py
+++ b/tests/testsuite/VersionManager.py
@@ -38,28 +38,28 @@ def test_get_vm(self):
 
     def test_filter_depend_vanilla(self):
         os.environ["USE"] = ""
-        self.assertEquals(self.verman.filter_depend(self.example_dep_vanilla), self.example_dep_vanilla)
+        self.assertEqual(self.verman.filter_depend(self.example_dep_vanilla), self.example_dep_vanilla)
 
     def test_filter_depend_or(self):
         # Oh you only realise how ugly things are once you write unittests.
         os.environ["USE"] = ""
         rmatch = "|| =virtual/jdk-1.5 =virtual/jdk-1.4 dev-java/ant-core java-virtuals/jaf"
-        self.assertEquals(self.verman.filter_depend(self.example_dep_or), rmatch)
+        self.assertEqual(self.verman.filter_depend(self.example_dep_or), rmatch)
     
     def test_filter_depend_use_enabled(self):
         os.environ["USE"] = "java"
         rmatch = ">=virtual/jdk-1.5* dev-java/ant-core java-virtuals/jaf"
-        self.assertEquals(self.verman.filter_depend(self.example_dep_use), rmatch)
+        self.assertEqual(self.verman.filter_depend(self.example_dep_use), rmatch)
 
     def test_filter_depend_use_disabled(self):
         os.environ["USE"] = ""
         rmatch = "dev-java/ant-core java-virtuals/jaf"
-        self.assertEquals(self.verman.filter_depend(self.example_dep_use), rmatch)
+        self.assertEqual(self.verman.filter_depend(self.example_dep_use), rmatch)
 
     def test_filter_depend_use_unset(self):
         del os.environ["USE"]
         rmatch = self.example_dep_use
-        self.assertEquals(self.verman.filter_depend(self.example_dep_use), rmatch)
+        self.assertEqual(self.verman.filter_depend(self.example_dep_use), rmatch)
 
     def test_version_satisfies(self):
         vm = self.em.get_vm('sun-jdk-1.6')
@@ -88,13 +88,13 @@ def test_version_satisfies(self):
 
     def test_get_lowest(self):
         target = self.verman.get_lowest(">=virtual/jdk-1.4")
-        self.assertEquals(target, '1.4')
+        self.assertEqual(target, '1.4')
         
         target = self.verman.get_lowest(self.example_dep_vanilla)
-        self.assertEquals(target, '1.5')
+        self.assertEqual(target, '1.5')
 
         target = self.verman.get_lowest(self.example_dep_or)
-        self.assertEquals(target, '1.4')
+        self.assertEqual(target, '1.4')
         
     def test_get_lowest_with_package_dep(self):
         pass
@@ -108,7 +108,7 @@ def test_get_lowest_with_package_dep(self):
     #def test_matches(self):
 
     def test_version_cmp(self):
-        self.assertEquals(self.verman.version_cmp('1.5.2', '1.5.2'), 0)
+        self.assertEqual(self.verman.version_cmp('1.5.2', '1.5.2'), 0)
         self.assertTrue(self.verman.version_cmp('1.5', '1.5.1') < 0)
         self.assertTrue(self.verman.version_cmp('1.5.1', '1.5') > 0)
 
