From 5bd3da8f06437b507f2442903043ff0d10359f83 Mon Sep 17 00:00:00 2001 From: Eriq Augustine Date: Tue, 6 Aug 2024 10:01:02 +0900 Subject: [PATCH] Updated tests to remove a deprecated assertion. --- tests/test_util.py | 8 ++++---- tests/test_util_containers.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_util.py b/tests/test_util.py index 28bd5623..7cf0b470 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -7,11 +7,11 @@ """ class UtilTest(unittest.TestCase): def test_hash(self): - self.assertEquals(util.buildHash(1), 630) - self.assertEquals(util.buildHash(2), 631) + self.assertEqual(util.buildHash(1), 630) + self.assertEqual(util.buildHash(2), 631) - self.assertEquals(util.buildHash(1, 1), 23311) - self.assertEquals(util.buildHash(1, 2), 23312) + self.assertEqual(util.buildHash(1, 1), 23311) + self.assertEqual(util.buildHash(1, 2), 23312) if __name__ == '__main__': unittest.main() diff --git a/tests/test_util_containers.py b/tests/test_util_containers.py index 74658f2f..9e8bcf27 100644 --- a/tests/test_util_containers.py +++ b/tests/test_util_containers.py @@ -16,7 +16,7 @@ def test_queue(self): for val in val_list: testQueue.push(val) self.assertFalse(testQueue.isEmpty()) - self.assertEquals(len(val_list), len(testQueue)) + self.assertEqual(len(val_list), len(testQueue)) # Test Queue for FIFO functionality. for val in val_list: @@ -30,7 +30,7 @@ def test_stack(self): for val in val_list: testStack.push(val) self.assertFalse(testStack.isEmpty()) - self.assertEquals(len(val_list), len(testStack)) + self.assertEqual(len(val_list), len(testStack)) # Test Stack for LIFO functionality. for val in reversed(val_list): @@ -46,7 +46,7 @@ def test_priority_queue(self): for val, pri in val_list: testPriorityQueue.push(val, pri) self.assertFalse(testPriorityQueue.isEmpty()) - self.assertEquals(len(val_list), len(testPriorityQueue)) + self.assertEqual(len(val_list), len(testPriorityQueue)) # Test Min Queue for priority functionality. for val, pri in reversed(val_list):