From 029e82d418377468dfa167397a9e7271414ab506 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 6 Dec 2023 14:40:06 +0000 Subject: bitbake: bb/toaster: Fix assertEquals deprecation warnings Fix: DeprecationWarning: Please use assertEqual instead (Bitbake rev: dd990ea6843685927954101feb729f3faa3a16d9) Signed-off-by: Richard Purdie --- bitbake/lib/bb/tests/codeparser.py | 2 +- bitbake/lib/toaster/tests/browser/test_all_builds_page.py | 8 ++++---- .../toaster/tests/browser/test_builddashboard_page_artifacts.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bitbake/lib/bb/tests/codeparser.py b/bitbake/lib/bb/tests/codeparser.py index b6f2b77ee3..f6585fb3aa 100644 --- a/bitbake/lib/bb/tests/codeparser.py +++ b/bitbake/lib/bb/tests/codeparser.py @@ -467,6 +467,6 @@ esac # self.d.setVar("oe_libinstall", "echo test") # self.d.setVar("FOO", "foo=oe_libinstall; eval $foo") # self.d.setVarFlag("FOO", "vardeps", "oe_*") - # self.assertEquals(deps, set(["oe_libinstall"])) + # self.assertEqual(deps, set(["oe_libinstall"])) diff --git a/bitbake/lib/toaster/tests/browser/test_all_builds_page.py b/bitbake/lib/toaster/tests/browser/test_all_builds_page.py index 228a62be7d..bfd8f3a439 100644 --- a/bitbake/lib/toaster/tests/browser/test_all_builds_page.py +++ b/bitbake/lib/toaster/tests/browser/test_all_builds_page.py @@ -259,25 +259,25 @@ class TestAllBuildsPage(SeleniumTestCase): element = self._get_build_time_element(build1) links = element.find_elements(By.CSS_SELECTOR, 'a') msg = 'should be a link on the build time for a successful recent build' - self.assertEquals(len(links), 1, msg) + self.assertEqual(len(links), 1, msg) # test recent builds area for failed build element = self._get_build_time_element(build2) links = element.find_elements(By.CSS_SELECTOR, 'a') msg = 'should not be a link on the build time for a failed recent build' - self.assertEquals(len(links), 0, msg) + self.assertEqual(len(links), 0, msg) # test the time column for successful build build1_row = self._get_row_for_build(build1) links = build1_row.find_elements(By.CSS_SELECTOR, 'td.time a') msg = 'should be a link on the build time for a successful build' - self.assertEquals(len(links), 1, msg) + self.assertEqual(len(links), 1, msg) # test the time column for failed build build2_row = self._get_row_for_build(build2) links = build2_row.find_elements(By.CSS_SELECTOR, 'td.time a') msg = 'should not be a link on the build time for a failed build' - self.assertEquals(len(links), 0, msg) + self.assertEqual(len(links), 0, msg) def test_builds_table_search_box(self): """ Test the search box in the builds table on the all builds page """ diff --git a/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py b/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py index c6226d60eb..adea2edb0a 100644 --- a/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py +++ b/bitbake/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py @@ -197,12 +197,12 @@ class TestBuildDashboardPageArtifacts(SeleniumTestCase): # check package count and size, link on target name selector = '[data-value="target-package-count"]' element = self.find(selector) - self.assertEquals(element.text, '1', + self.assertEqual(element.text, '1', 'package count should be shown for image builds') selector = '[data-value="target-package-size"]' element = self.find(selector) - self.assertEquals(element.text, '1.0 KB', + self.assertEqual(element.text, '1.0 KB', 'package size should be shown for image builds') selector = '[data-link="target-packages"]' -- cgit v1.2.3-54-g00ecf