Skip to content

Commit

Permalink
Updated tests to remove a deprecated assertion.
Browse files Browse the repository at this point in the history
  • Loading branch information
eriq-augustine committed Aug 6, 2024
1 parent cca9369 commit 5bd3da8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
6 changes: 3 additions & 3 deletions tests/test_util_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit 5bd3da8

Please sign in to comment.