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):
301
301
302
302
async def test_bulk_max_message_size (self ):
303
303
await self .coll .delete_many ({})
304
+ self .addAsyncCleanup (self .coll .delete_many , {})
304
305
_16_MB = 16 * 1000 * 1000
305
306
# Generate a list of documents such that the first batched OP_MSG is
306
307
# as close as possible to the 48MB limit.
@@ -314,7 +315,6 @@ async def test_bulk_max_message_size(self):
314
315
docs .append ({"_id" : i })
315
316
result = await self .coll .insert_many (docs )
316
317
self .assertEqual (len (docs ), len (result .inserted_ids ))
317
- await self .coll .delete_many ({})
318
318
319
319
async def test_generator_insert (self ):
320
320
def gen ():
Original file line number Diff line number Diff line change @@ -1849,7 +1849,6 @@ async def test_network_error_message(self):
1849
1849
expected = "{}:{}: " .format (* (await client .address ))
1850
1850
with self .assertRaisesRegex (AutoReconnect , expected ):
1851
1851
await client .pymongo_test .test .find_one ({})
1852
- print ("woo!" )
1853
1852
1854
1853
@unittest .skipIf ("PyPy" in sys .version , "PYTHON-2938 could fail on PyPy" )
1855
1854
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):
248
248
event .command ,
249
249
f"{ msg } sent txnNumber with { event .command_name } " ,
250
250
)
251
- print ("woo!" )
252
251
253
252
async def test_server_selection_timeout_not_retried (self ):
254
253
"""A ServerSelectionTimeoutError is not retried."""
Original file line number Diff line number Diff line change @@ -301,6 +301,7 @@ def test_numerous_inserts(self):
301
301
302
302
def test_bulk_max_message_size (self ):
303
303
self .coll .delete_many ({})
304
+ self .addCleanup (self .coll .delete_many , {})
304
305
_16_MB = 16 * 1000 * 1000
305
306
# Generate a list of documents such that the first batched OP_MSG is
306
307
# as close as possible to the 48MB limit.
@@ -314,7 +315,6 @@ def test_bulk_max_message_size(self):
314
315
docs .append ({"_id" : i })
315
316
result = self .coll .insert_many (docs )
316
317
self .assertEqual (len (docs ), len (result .inserted_ids ))
317
- self .coll .delete_many ({})
318
318
319
319
def test_generator_insert (self ):
320
320
def gen ():
Original file line number Diff line number Diff line change @@ -1806,7 +1806,6 @@ def test_network_error_message(self):
1806
1806
expected = "{}:{}: " .format (* (client .address ))
1807
1807
with self .assertRaisesRegex (AutoReconnect , expected ):
1808
1808
client .pymongo_test .test .find_one ({})
1809
- print ("woo!" )
1810
1809
1811
1810
@unittest .skipIf ("PyPy" in sys .version , "PYTHON-2938 could fail on PyPy" )
1812
1811
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):
246
246
event .command ,
247
247
f"{ msg } sent txnNumber with { event .command_name } " ,
248
248
)
249
- print ("woo!" )
250
249
251
250
def test_server_selection_timeout_not_retried (self ):
252
251
"""A ServerSelectionTimeoutError is not retried."""
You can’t perform that action at this time.
0 commit comments