File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ pushd %~dp0
44
55REM Command file for Sphinx documentation
66
7- if " %SPHINXBUILD % " == " " (
8- set SPHINXBUILD = --color -W --keep-going
7+ if " %SPHINXOPTS % " == " " (
8+ set SPHINXOPTS = --color -W --keep-going
99)
1010if " %SPHINXBUILD% " == " " (
1111 set SPHINXBUILD = sphinx-build
Original file line number Diff line number Diff line change @@ -106,3 +106,25 @@ class sqliteDB(LocalControllerLauncher):
106106 controller_args = ["--sqlitedb" ]
107107
108108 return sqliteDB
109+
110+
111+ class TestLabelMongoDB (TaskLabelTest , TestCase ):
112+
113+ def get_controller_launcher (self ):
114+ class mongoDB (LocalControllerLauncher ):
115+ database = "mongodb-label-test" # use this database label for testing
116+ controller_args = ["--mongodb" , f"--MongoDB.database={ database } " ]
117+
118+ try :
119+ from pymongo import MongoClient
120+ c = MongoClient (serverSelectionTimeoutMS = 2000 )
121+ servinfo = c .server_info () # checks if mongo server is reachable using the default connection parameter
122+
123+ # make sure that test database is empty
124+ db = c [mongoDB .database ]
125+ records = db .get_collection ("task_records" )
126+ records .delete_many ({})
127+ except (ImportError , Exception ):
128+ pytest .skip ("Requires mongodb" )
129+
130+ return mongoDB
You can’t perform that action at this time.
0 commit comments