mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 21:09:03 +02:00
oeqa: replace deprecated assertEquals
assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. (From OE-Core rev: 68286d0b70cf09a0d2950b48945c9192fb8c8769) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
233d2d8c0d
commit
f58aedff02
|
@ -21,4 +21,4 @@ class SanityTests(OESDKTestCase):
|
|||
# Canonicalise the location of this command
|
||||
tool_path = os.path.realpath(self._run("command -v %s" % command).strip())
|
||||
# Assert that the tool was found inside the SDK root
|
||||
self.assertEquals(os.path.commonprefix((sdk_base, tool_path)), sdk_base)
|
||||
self.assertEqual(os.path.commonprefix((sdk_base, tool_path)), sdk_base)
|
||||
|
|
|
@ -1097,7 +1097,7 @@ class DevtoolModifyTests(DevtoolBase):
|
|||
runCmd('git -C %s checkout %s' % (tempdir, branch))
|
||||
with open(source, "rt") as f:
|
||||
content = f.read()
|
||||
self.assertEquals(content, expected)
|
||||
self.assertEqual(content, expected)
|
||||
if self.td["MACHINE"] == "qemux86":
|
||||
check('devtool', 'This is a test for qemux86\n')
|
||||
elif self.td["MACHINE"] == "qemuarm":
|
||||
|
|
|
@ -99,6 +99,6 @@ class LibOE(OESelftestTestCase):
|
|||
|
||||
dstcnt = len(os.listdir(dst))
|
||||
srccnt = len(os.listdir(src))
|
||||
self.assertEquals(dstcnt, len(testfiles), "Number of files in dst (%s) differs from number of files in src(%s)." % (dstcnt, srccnt))
|
||||
self.assertEqual(dstcnt, len(testfiles), "Number of files in dst (%s) differs from number of files in src(%s)." % (dstcnt, srccnt))
|
||||
|
||||
oe.path.remove(testloc)
|
||||
|
|
Loading…
Reference in New Issue
Block a user