@@ -18,25 +18,30 @@ def setUp(self):
18
18
19
19
def wait_for_element_by_css_selector (self , selector ):
20
20
start_time = time .time ()
21
+ exception = Exception ('Time ran out, {} not found' .format (selector ))
21
22
while time .time () < start_time + 20 :
22
23
try :
23
24
return self .driver .find_element_by_css_selector (selector )
24
25
except Exception as e :
26
+ exception = e
25
27
pass
26
28
time .sleep (0.25 )
27
- raise e
29
+ raise exception
28
30
29
31
def wait_for_text_to_equal (self , selector , assertion_text ):
30
32
start_time = time .time ()
33
+ exception = Exception ('Time ran out, {} on {} not found' .format (
34
+ assertion_text , selector ))
31
35
while time .time () < start_time + 20 :
32
36
el = self .wait_for_element_by_css_selector (selector )
33
37
try :
34
38
return self .assertEqual (el .text , assertion_text )
35
39
except Exception as e :
40
+ exception = e
36
41
pass
37
42
time .sleep (0.25 )
38
43
39
- raise e
44
+ raise exception
40
45
41
46
def request_queue_assertions (
42
47
self , check_rejected = True , expected_length = None ):
@@ -1679,7 +1684,7 @@ def test_initialization_with_overlapping_outputs(self):
1679
1684
def generate_callback (outputid ):
1680
1685
def callback (* args ):
1681
1686
call_counts [outputid ].value += 1
1682
- return str ( args )
1687
+ return '{}, {}' . format ( * args )
1683
1688
return callback
1684
1689
1685
1690
for i in range (1 , 5 ):
@@ -1700,7 +1705,7 @@ def callback(*args):
1700
1705
self .assertEqual (call_counts [outputid ].value , 1 )
1701
1706
self .wait_for_text_to_equal (
1702
1707
'#{}' .format (outputid ),
1703
- "(u' input-{}', u' input-{}') " .format (i , i + 1 )
1708
+ "input-{}, input-{}" .format (i , i + 1 )
1704
1709
)
1705
1710
1706
1711
def test_generate_overlapping_outputs (self ):
@@ -1742,7 +1747,7 @@ def display_output(*args):
1742
1747
def generate_callback (outputid ):
1743
1748
def callback (* args ):
1744
1749
call_counts [outputid ].value += 1
1745
- return str ( args )
1750
+ return '{}, {}' . format ( * args )
1746
1751
return callback
1747
1752
1748
1753
for i in range (1 , 5 ):
@@ -1764,6 +1769,6 @@ def callback(*args):
1764
1769
self .assertEqual (call_counts [outputid ].value , 1 )
1765
1770
self .wait_for_text_to_equal (
1766
1771
'#{}' .format (outputid ),
1767
- "(u' input-{}', u' input-{}') " .format (i , i + 1 )
1772
+ "input-{}, input-{}" .format (i , i + 1 )
1768
1773
)
1769
1774
self .assertEqual (call_counts ['container' ].value , 1 )
0 commit comments