File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ def driver(pytestconfig):
7171 driver = Chrome (options = chrome_options )
7272
7373 driver .set_window_size (1080 , 800 )
74- driver .set_page_load_timeout (5 )
75- driver .implicitly_wait (5 )
74+ driver .set_page_load_timeout (3 )
75+ driver .implicitly_wait (3 )
7676
7777 try :
7878 yield driver
Original file line number Diff line number Diff line change 11import idom
22
3- # The IDOM server is running in a seperate thread so asyncio
4- # can't help us with synchronization problems here
5- from threading import Condition
3+ from queue import Queue
64
75
86def test_simple_hello_world (driver , display ):
@@ -63,18 +61,17 @@ async def on_change(event):
6361
6462
6563def test_animation (driver , display ):
66- count_confirmed = Condition ()
64+ count_queue = Queue ()
6765
6866 @idom .element
69- async def Counter (self , count = 0 ):
67+ async def Counter (self ):
7068
71- with count_confirmed :
72- count_confirmed .wait ()
69+ count = count_queue .get ()
7370
7471 @self .animate
7572 async def increment (stop ):
7673 if count < 5 :
77- self .update (count + 1 )
74+ self .update ()
7875 else :
7976 stop ()
8077
@@ -83,8 +80,7 @@ async def increment(stop):
8380 display (Counter )
8481
8582 for i in range (6 ):
86- with count_confirmed :
87- count_confirmed .notify ()
83+ count_queue .put (i )
8884 driver .find_element_by_id (f"counter-{ i } " )
8985
9086
You can’t perform that action at this time.
0 commit comments