Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit ec1a93f

Browse files
committed
cleanup lint
1 parent 3eabd2d commit ec1a93f

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

runestone/activecode/test/test_activecode.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
from selenium.webdriver import ActionChains
22
from selenium.webdriver.support import expected_conditions as EC
3-
from selenium.webdriver.support.ui import WebDriverWait
43
from selenium.webdriver.common.by import By
5-
from selenium.common.exceptions import ElementClickInterceptedException
4+
from selenium.common.exceptions import (
5+
ElementClickInterceptedException,
6+
TimeoutException,
7+
)
68
import time
79
from runestone.unittest_base import module_fixture_maker, RunestoneTestCase
810

@@ -21,7 +23,7 @@ def test_hello(self):
2123
self.driver.get(self.host + "/index.html")
2224
try:
2325
self.wait.until(EC.presence_of_element_located((By.ID, "test1")))
24-
except:
26+
except TimeoutException:
2527
text = self.driver.page_source
2628
print(text[:300])
2729
t1 = self.driver.find_element_by_id("test1")
@@ -47,7 +49,7 @@ def test_hidden(self):
4749
self.driver.get(self.host + "/index.html")
4850
try:
4951
self.wait.until(EC.presence_of_element_located((By.ID, "testprefixcode")))
50-
except:
52+
except TimeoutException:
5153
text = self.driver.page_source
5254
print(text[:300])
5355
t1 = self.driver.find_element_by_id("testprefixcode")
@@ -143,7 +145,7 @@ def test_livecode_datafile(self):
143145
print("Ouput so far:", output.text)
144146
try:
145147
self.assertLess(count, 20)
146-
except:
148+
except Exception:
147149
print("WARNING - No response from JOBE server")
148150

149151
def test_activity_count(self):

0 commit comments

Comments
 (0)