Skip to content

Commit 4e16aad

Browse files
author
Johannes Otepka
committed
corrections within windows
1 parent 9216581 commit 4e16aad

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

docs/make.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ pushd %~dp0
44

55
REM 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
)
1010
if "%SPHINXBUILD%" == "" (
1111
set SPHINXBUILD=sphinx-build

ipyparallel/tests/test_label.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)