Skip to content

Commit 2ebf76b

Browse files
committed
allow doctest to work on older server versions
1 parent 974ebfa commit 2ebf76b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
client = MongoClient()
106106
client.drop_database("doctest_test")
107107
db = client.doctest_test
108+
server_major_version = int(client.server_info()['version'].split()[0])
108109
"""
109110

110111
# -- Options for HTML output ---------------------------------------------------

doc/examples/client_bulk.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Client Bulk Write Operations
22
=============================
33

44
.. testsetup::
5+
:skipif: server_major_version < 8
56

67
from pymongo import MongoClient
78

0 commit comments

Comments
 (0)