File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1189,6 +1189,7 @@ def setUp(self) -> None:
11891189 if client_context .serverless and not getattr (self , "RUN_ON_SERVERLESS" , False ):
11901190 raise SkipTest ("this test does not support serverless" )
11911191 self .client = client_context .client
1192+ self .addCleanup (self .client .close )
11921193 self .db = self .client .pymongo_test
11931194 if client_context .auth_enabled :
11941195 self .credentials = {"username" : db_user , "password" : db_pwd }
Original file line number Diff line number Diff line change @@ -1207,6 +1207,7 @@ async def asyncSetUp(self) -> None:
12071207 if async_client_context .serverless and not getattr (self , "RUN_ON_SERVERLESS" , False ):
12081208 raise SkipTest ("this test does not support serverless" )
12091209 self .client = async_client_context .client
1210+ self .addAsyncCleanup (self .client .close )
12101211 self .db = self .client .pymongo_test
12111212 if async_client_context .auth_enabled :
12121213 self .credentials = {"username" : db_user , "password" : db_pwd }
You can’t perform that action at this time.
0 commit comments