Skip to content

Commit 35698e0

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 715a56d + dc34833 commit 35698e0

File tree

5 files changed

+16
-0
lines changed

5 files changed

+16
-0
lines changed

test/asynchronous/test_cursor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import copy
1919
import gc
2020
import itertools
21+
import os
2122
import random
2223
import re
2324
import sys
@@ -1412,6 +1413,8 @@ async def test_to_list_length(self):
14121413
self.assertEqual(len(docs), 2)
14131414

14141415
async def test_to_list_csot_applied(self):
1416+
if os.environ.get("SKIP_CSOT_TESTS", ""):
1417+
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
14151418
client = await self.async_single_client(timeoutMS=500, w=1)
14161419
coll = client.pymongo.test
14171420
# Initialize the client with a larger timeout to help make test less flakey
@@ -1453,6 +1456,8 @@ async def test_command_cursor_to_list_length(self):
14531456

14541457
@async_client_context.require_failCommand_blockConnection
14551458
async def test_command_cursor_to_list_csot_applied(self):
1459+
if os.environ.get("SKIP_CSOT_TESTS", ""):
1460+
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
14561461
client = await self.async_single_client(timeoutMS=500, w=1)
14571462
coll = client.pymongo.test
14581463
# Initialize the client with a larger timeout to help make test less flakey

test/asynchronous/unified_format.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ class UnifiedSpecTestMixinV1(AsyncIntegrationTest):
442442
RUN_ON_LOAD_BALANCER = True
443443
RUN_ON_SERVERLESS = True
444444
TEST_SPEC: Any
445+
TEST_PATH = "" # This gets filled in by generate_test_classes
445446
mongos_clients: list[AsyncMongoClient] = []
446447

447448
@staticmethod

test/test_csot.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class TestCSOT(IntegrationTest):
3939
RUN_ON_LOAD_BALANCER = True
4040

4141
def test_timeout_nested(self):
42+
if os.environ.get("SKIP_CSOT_TESTS", ""):
43+
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
4244
coll = self.db.coll
4345
self.assertEqual(_csot.get_timeout(), None)
4446
self.assertEqual(_csot.get_deadline(), float("inf"))
@@ -76,6 +78,8 @@ def test_timeout_nested(self):
7678

7779
@client_context.require_change_streams
7880
def test_change_stream_can_resume_after_timeouts(self):
81+
if os.environ.get("SKIP_CSOT_TESTS", ""):
82+
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
7983
coll = self.db.test
8084
coll.insert_one({})
8185
with coll.watch() as stream:

test/test_cursor.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import copy
1919
import gc
2020
import itertools
21+
import os
2122
import random
2223
import re
2324
import sys
@@ -1403,6 +1404,8 @@ def test_to_list_length(self):
14031404
self.assertEqual(len(docs), 2)
14041405

14051406
def test_to_list_csot_applied(self):
1407+
if os.environ.get("SKIP_CSOT_TESTS", ""):
1408+
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
14061409
client = self.single_client(timeoutMS=500, w=1)
14071410
coll = client.pymongo.test
14081411
# Initialize the client with a larger timeout to help make test less flakey
@@ -1444,6 +1447,8 @@ def test_command_cursor_to_list_length(self):
14441447

14451448
@client_context.require_failCommand_blockConnection
14461449
def test_command_cursor_to_list_csot_applied(self):
1450+
if os.environ.get("SKIP_CSOT_TESTS", ""):
1451+
raise unittest.SkipTest("SKIP_CSOT_TESTS is set, skipping...")
14471452
client = self.single_client(timeoutMS=500, w=1)
14481453
coll = client.pymongo.test
14491454
# Initialize the client with a larger timeout to help make test less flakey

test/unified_format.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ class UnifiedSpecTestMixinV1(IntegrationTest):
441441
RUN_ON_LOAD_BALANCER = True
442442
RUN_ON_SERVERLESS = True
443443
TEST_SPEC: Any
444+
TEST_PATH = "" # This gets filled in by generate_test_classes
444445
mongos_clients: list[MongoClient] = []
445446

446447
@staticmethod

0 commit comments

Comments
 (0)