Rodja Trappe il y a 2 ans
Parent
commit
c58959eb8a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      tests/user.py

+ 2 - 2
tests/user.py

@@ -1,6 +1,6 @@
 import threading
+import time
 from asyncio import start_server
-from time import sleep
 
 from nicegui import globals as nicegui_globals
 from nicegui import ui
@@ -20,7 +20,7 @@ class User():
         '''Start the webserver in a separate thread. This is the equivalent of `ui.run()` in a normal script.'''
         self.thread = threading.Thread(target=ui.run, kwargs={'port': 3392, 'show': False, 'reload': False})
         self.thread.start()
-        sleep(1)
+        time.sleep(1)
 
     def stop_server(self) -> None:
         '''Stop the webserver.'''