@@ -60,7 +60,6 @@ def __init__(
6060 app = self ._app , host = self .host , port = self .port , loop = "asyncio"
6161 )
6262 )
63- self .webserver_thread : Thread
6463
6564 @property
6665 def log_records (self ) -> list [logging .LogRecord ]:
@@ -112,8 +111,7 @@ async def __aenter__(self) -> BackendFixture:
112111 self ._records = self ._exit_stack .enter_context (capture_reactpy_logs ())
113112
114113 # Wait for the server to start
115- self .webserver_thread : Thread = Thread (target = self .webserver .run , daemon = True )
116- self .webserver_thread .start ()
114+ Thread (target = self .webserver .run , daemon = True ).start ()
117115 await asyncio .sleep (1 )
118116
119117 return self
@@ -126,8 +124,6 @@ async def __aexit__(
126124 ) -> None :
127125 await self ._exit_stack .aclose ()
128126
129- self .mount (None ) # reset the view
130-
131127 logged_errors = self .list_logged_exceptions (del_log_records = False )
132128 if logged_errors : # nocov
133129 msg = "Unexpected logged exception"
@@ -136,7 +132,6 @@ async def __aexit__(
136132 await asyncio .wait_for (
137133 self .webserver .shutdown (), timeout = REACTPY_TESTS_DEFAULT_TIMEOUT .current
138134 )
139- self .webserver_thread .join (timeout = REACTPY_TESTS_DEFAULT_TIMEOUT .current )
140135
141136 async def restart (self ) -> None :
142137 """Restart the server"""
0 commit comments