diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-06 14:40:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-06 22:27:21 +0000 |
commit | dd990ea6843685927954101feb729f3faa3a16d9 (patch) | |
tree | d6f68a339d51bb27665f74bec99384c9208183f7 | |
parent | 72908138bd2735c69f5e418ec5f0f2cf8215050a (diff) | |
download | bitbake-dd990ea6843685927954101feb729f3faa3a16d9.tar.gz |
bb/toaster: Fix assertEquals deprecation warnings
Fix:
DeprecationWarning: Please use assertEqual instead
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/tests/codeparser.py | 2 | ||||
-rw-r--r-- | lib/toaster/tests/browser/test_all_builds_page.py | 8 | ||||
-rw-r--r-- | lib/toaster/tests/browser/test_builddashboard_page_artifacts.py | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/lib/bb/tests/codeparser.py b/lib/bb/tests/codeparser.py index b6f2b77ee..f6585fb3a 100644 --- a/lib/bb/tests/codeparser.py +++ b/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/lib/toaster/tests/browser/test_all_builds_page.py b/lib/toaster/tests/browser/test_all_builds_page.py index 228a62be7..bfd8f3a43 100644 --- a/lib/toaster/tests/browser/test_all_builds_page.py +++ b/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/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py b/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py index c6226d60e..adea2edb0 100644 --- a/lib/toaster/tests/browser/test_builddashboard_page_artifacts.py +++ b/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"]' |