summaryrefslogtreecommitdiffstats
path: root/lib/toaster/tests
diff options
context:
space:
mode:
authorFrazer Clews <frazerleslieclews@gmail.com>2020-08-24 15:51:37 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-25 18:14:46 +0100
commitb0c807be5c2170c9481c1a04d4c11972135d7dc5 (patch)
tree9f5f673f8d88baa82120d0dbf7284d148fb04219 /lib/toaster/tests
parent4bb71b627767297269e762b414443e15e28bfac4 (diff)
downloadbitbake-b0c807be5c2170c9481c1a04d4c11972135d7dc5.tar.gz
lib: fix most undefined code picked up by pylint
Correctly import, and inherit functions, and variables. Also fix some typos and remove some Python 2 code that isn't recognised. Signed-off-by: Frazer Clews <frazerleslieclews@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/toaster/tests')
-rw-r--r--lib/toaster/tests/functional/functional_helpers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/toaster/tests/functional/functional_helpers.py b/lib/toaster/tests/functional/functional_helpers.py
index 455c408e9..5c4ea7179 100644
--- a/lib/toaster/tests/functional/functional_helpers.py
+++ b/lib/toaster/tests/functional/functional_helpers.py
@@ -75,7 +75,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
try:
table_element = self.get_table_element(table_id)
element = table_element.find_element_by_link_text(link_text)
- except NoSuchElementException as e:
+ except self.NoSuchElementException:
print('no element found')
raise
return element
@@ -86,7 +86,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
element_xpath = "//*[@id='" + table_id + "']"
try:
element = self.driver.find_element_by_xpath(element_xpath)
- except NoSuchElementException as e:
+ except self.NoSuchElementException:
raise
return element
row = coordinate[0]
@@ -96,7 +96,7 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
element_xpath = "//*[@id='" + table_id + "']/tbody/tr[" + str(row) + "]"
try:
element = self.driver.find_element_by_xpath(element_xpath)
- except NoSuchElementException as e:
+ except self.NoSuchElementException:
return False
return element
#now we are looking for an element with specified X and Y
@@ -105,6 +105,6 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase):
element_xpath = "//*[@id='" + table_id + "']/tbody/tr[" + str(row) + "]/td[" + str(column) + "]"
try:
element = self.driver.find_element_by_xpath(element_xpath)
- except NoSuchElementException as e:
+ except self.NoSuchElementException:
return False
return element