Skip to content

Commit 54b8058

Browse files
committed
PYTHON-1571 - Skip group tests with MongoDB 4.1+
1 parent 83eb724 commit 54b8058

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

test/test_collation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def test_explain_command(self):
195195
self.last_command_started()['explain']['collation'])
196196

197197
@raisesConfigurationErrorForOldMongoDB
198+
@client_context.require_version_max(4, 1, 0, -1)
198199
def test_group(self):
199200
self.db.test.group('foo', {'foo': {'$gt': 42}}, {},
200201
'function(a, b) { return a; }',

test/test_legacy_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,7 @@ def transform_outgoing(self, son, collection):
915915
c.find_and_modify({'_id': 1}, {'$inc': {'i': 1}},
916916
new=True))
917917

918+
@client_context.require_version_max(4, 1, 0, -1)
918919
def test_group(self):
919920
db = self.db
920921
db.drop_collection("test")
@@ -979,6 +980,7 @@ def test_group(self):
979980
self.assertRaises(OperationFailure, db.test.group,
980981
[], {}, {}, "5 ++ 5")
981982

983+
@client_context.require_version_max(4, 1, 0, -1)
982984
def test_group_with_scope(self):
983985
db = self.db
984986
db.drop_collection("test")
@@ -1010,6 +1012,7 @@ def test_group_with_scope(self):
10101012
[], {}, {"count": 0},
10111013
Code(reduce_function, {"inc_value": 0.5}))[0]['count'])
10121014

1015+
@client_context.require_version_max(4, 1, 0, -1)
10131016
def test_group_uuid_representation(self):
10141017
db = self.db
10151018
coll = db.uuid

test/test_read_preferences.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ def test_create_collection(self):
419419
lambda: self.c.pymongo_test.create_collection(
420420
'some_collection%s' % random.randint(0, MAXSIZE)))
421421

422+
@client_context.require_version_max(4, 1, 0, -1)
422423
def test_group(self):
423424
with warnings.catch_warnings():
424425
warnings.simplefilter("ignore")

0 commit comments

Comments
 (0)