@@ -60,7 +60,6 @@ def __init__(
60
60
app = self ._app , host = self .host , port = self .port , loop = "asyncio"
61
61
)
62
62
)
63
- self .webserver_thread : Thread
64
63
65
64
@property
66
65
def log_records (self ) -> list [logging .LogRecord ]:
@@ -112,8 +111,7 @@ async def __aenter__(self) -> BackendFixture:
112
111
self ._records = self ._exit_stack .enter_context (capture_reactpy_logs ())
113
112
114
113
# 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 ()
117
115
await asyncio .sleep (1 )
118
116
119
117
return self
@@ -126,8 +124,6 @@ async def __aexit__(
126
124
) -> None :
127
125
await self ._exit_stack .aclose ()
128
126
129
- self .mount (None ) # reset the view
130
-
131
127
logged_errors = self .list_logged_exceptions (del_log_records = False )
132
128
if logged_errors : # nocov
133
129
msg = "Unexpected logged exception"
@@ -136,7 +132,6 @@ async def __aexit__(
136
132
await asyncio .wait_for (
137
133
self .webserver .shutdown (), timeout = REACTPY_TESTS_DEFAULT_TIMEOUT .current
138
134
)
139
- self .webserver_thread .join (timeout = REACTPY_TESTS_DEFAULT_TIMEOUT .current )
140
135
141
136
async def restart (self ) -> None :
142
137
"""Restart the server"""
0 commit comments