summaryrefslogtreecommitdiff
path: root/tools/binman/entry_test.py
diff options
context:
space:
mode:
authorBrandon Maier <[email protected]>2024-06-04 16:16:05 +0000
committerSimon Glass <[email protected]>2024-07-03 07:36:33 +0100
commit357bfca5e616c7fc003cce1ddda44016660cf75f (patch)
tree4d45866d92d8a4e197404acc64451c2ffb04015b /tools/binman/entry_test.py
parenta8729a260b53b9a2fce2607ac90744a47f96daef (diff)
tools: binman: fix deprecated Python unittest methods
The methods `unittest.assertEquals()` and `unittest.assertRegexpMatches()` are marked deprecated[1]. In Python 3.12 these aliases have been removed, so do a sed to replace them with their new names. [1] https://docs.python.org/3.11/library/unittest.html#deprecated-aliases Signed-off-by: Brandon Maier <[email protected]> CC: Simon Glass <[email protected]> CC: Alper Nebi Yasak <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'tools/binman/entry_test.py')
-rw-r--r--tools/binman/entry_test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py
index ac6582cf86a..40d74d401a2 100644
--- a/tools/binman/entry_test.py
+++ b/tools/binman/entry_test.py
@@ -103,7 +103,7 @@ class TestEntry(unittest.TestCase):
ent = entry.Entry.Create(None, self.GetNode(), 'missing',
missing_etype=True)
self.assertTrue(isinstance(ent, Entry_blob))
- self.assertEquals('missing', ent.etype)
+ self.assertEqual('missing', ent.etype)
def testDecompressData(self):
"""Test the DecompressData() method of the base class"""
@@ -111,8 +111,8 @@ class TestEntry(unittest.TestCase):
base.compress = 'lz4'
bintools = {}
base.comp_bintool = base.AddBintool(bintools, '_testing')
- self.assertEquals(tools.get_bytes(0, 1024), base.CompressData(b'abc'))
- self.assertEquals(tools.get_bytes(0, 1024), base.DecompressData(b'abc'))
+ self.assertEqual(tools.get_bytes(0, 1024), base.CompressData(b'abc'))
+ self.assertEqual(tools.get_bytes(0, 1024), base.DecompressData(b'abc'))
def testLookupOffset(self):
"""Test the lookup_offset() method of the base class"""