File tree Expand file tree Collapse file tree 6 files changed +2
-6
lines changed
Expand file tree Collapse file tree 6 files changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ async def test_numerous_inserts(self):
301301
302302 async def test_bulk_max_message_size (self ):
303303 await self .coll .delete_many ({})
304+ self .addAsyncCleanup (self .coll .delete_many , {})
304305 _16_MB = 16 * 1000 * 1000
305306 # Generate a list of documents such that the first batched OP_MSG is
306307 # as close as possible to the 48MB limit.
@@ -314,7 +315,6 @@ async def test_bulk_max_message_size(self):
314315 docs .append ({"_id" : i })
315316 result = await self .coll .insert_many (docs )
316317 self .assertEqual (len (docs ), len (result .inserted_ids ))
317- await self .coll .delete_many ({})
318318
319319 async def test_generator_insert (self ):
320320 def gen ():
Original file line number Diff line number Diff line change @@ -1849,7 +1849,6 @@ async def test_network_error_message(self):
18491849 expected = "{}:{}: " .format (* (await client .address ))
18501850 with self .assertRaisesRegex (AutoReconnect , expected ):
18511851 await client .pymongo_test .test .find_one ({})
1852- print ("woo!" )
18531852
18541853 @unittest .skipIf ("PyPy" in sys .version , "PYTHON-2938 could fail on PyPy" )
18551854 async def test_process_periodic_tasks (self ):
Original file line number Diff line number Diff line change @@ -248,7 +248,6 @@ async def test_unsupported_single_statement(self):
248248 event .command ,
249249 f"{ msg } sent txnNumber with { event .command_name } " ,
250250 )
251- print ("woo!" )
252251
253252 async def test_server_selection_timeout_not_retried (self ):
254253 """A ServerSelectionTimeoutError is not retried."""
Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ def test_numerous_inserts(self):
301301
302302 def test_bulk_max_message_size (self ):
303303 self .coll .delete_many ({})
304+ self .addCleanup (self .coll .delete_many , {})
304305 _16_MB = 16 * 1000 * 1000
305306 # Generate a list of documents such that the first batched OP_MSG is
306307 # as close as possible to the 48MB limit.
@@ -314,7 +315,6 @@ def test_bulk_max_message_size(self):
314315 docs .append ({"_id" : i })
315316 result = self .coll .insert_many (docs )
316317 self .assertEqual (len (docs ), len (result .inserted_ids ))
317- self .coll .delete_many ({})
318318
319319 def test_generator_insert (self ):
320320 def gen ():
Original file line number Diff line number Diff line change @@ -1806,7 +1806,6 @@ def test_network_error_message(self):
18061806 expected = "{}:{}: " .format (* (client .address ))
18071807 with self .assertRaisesRegex (AutoReconnect , expected ):
18081808 client .pymongo_test .test .find_one ({})
1809- print ("woo!" )
18101809
18111810 @unittest .skipIf ("PyPy" in sys .version , "PYTHON-2938 could fail on PyPy" )
18121811 def test_process_periodic_tasks (self ):
Original file line number Diff line number Diff line change @@ -246,7 +246,6 @@ def test_unsupported_single_statement(self):
246246 event .command ,
247247 f"{ msg } sent txnNumber with { event .command_name } " ,
248248 )
249- print ("woo!" )
250249
251250 def test_server_selection_timeout_not_retried (self ):
252251 """A ServerSelectionTimeoutError is not retried."""
You can’t perform that action at this time.
0 commit comments