##// END OF EJS Templates
Merge pull request #2238 from takluyver/fasttest...
Merge pull request #2238 from takluyver/fasttest Fast Test See #2026. By default `iptest` will only run the faster tests, and `iptest --all` is necessary to run all of them. At present, it just cuts out `IPython.parallel`, but we can refine that if we want to. `test_pr` is also updated so that you can pass extra arguments through to iptest.

File last commit:

r7533:7a85cbc1
r8131:ecae5d1b merge
Show More
test_mongodb.py
44 lines | 1.1 KiB | text/x-python | PythonLexer
MinRK
update recently changed modules with Authors in docstring
r4018 """Tests for mongodb backend
Authors:
* Min RK
"""
MinRK
various db backend fixes...
r3875
#-------------------------------------------------------------------------------
# Copyright (C) 2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Imports
#-------------------------------------------------------------------------------
MinRK
add size-limiting to the DictDB backend
r7533 from unittest import TestCase
MinRK
various db backend fixes...
r3875 from nose import SkipTest
from pymongo import Connection
from IPython.parallel.controller.mongodb import MongoDB
from . import test_db
try:
c = Connection()
except Exception:
c=None
MinRK
add size-limiting to the DictDB backend
r7533 class TestMongoBackend(test_db.TaskDBTest, TestCase):
MinRK
various db backend fixes...
r3875 """MongoDB backend tests"""
def create_db(self):
try:
return MongoDB(database='iptestdb', _connection=c)
except Exception:
raise SkipTest("Couldn't connect to mongodb")
def teardown(self):
if c is not None:
c.drop_database('iptestdb')