summaryrefslogtreecommitdiff
path: root/tests/test_websupport.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-21 23:03:06 +0200
committerGeorg Brandl <georg@python.org>2010-08-21 23:03:06 +0200
commit2f2a09c9198f753c3a407fef0630a15b0ebe66af (patch)
treebe4410f2ccf51a69e6056e57fc13ed53b703a381 /tests/test_websupport.py
parent9acc57b616eeda8490b60de1199a9ddda8f00208 (diff)
downloadsphinx-git-2f2a09c9198f753c3a407fef0630a15b0ebe66af.tar.gz
Improve websupport test skipping, add new decorator for search adapter skipping.
Diffstat (limited to 'tests/test_websupport.py')
-rw-r--r--tests/test_websupport.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_websupport.py b/tests/test_websupport.py
index 1ac96f8d2..65957378b 100644
--- a/tests/test_websupport.py
+++ b/tests/test_websupport.py
@@ -22,6 +22,7 @@ from nose import SkipTest
from sphinx.websupport import WebSupport
from sphinx.websupport.errors import *
+from sphinx.websupport.storage import StorageBackend
from sphinx.websupport.storage.differ import CombinedHtmlDiff
try:
from sphinx.websupport.storage.sqlalchemystorage import Session, \
@@ -57,17 +58,23 @@ def with_support(*args, **kwargs):
return generator
-@with_support()
+class NullStorage(StorageBackend):
+ pass
+
+
+@with_support(storage=NullStorage())
def test_no_srcdir(support):
"""Make sure the correct exception is raised if srcdir is not given."""
raises(SrcdirNotSpecifiedError, support.build)
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
@with_support(srcdir=test_root)
def test_build(support):
support.build()
+@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
@with_support()
def test_get_document(support):
raises(DocumentNotFoundError, support.get_document, 'nonexisting')