summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-14 09:36:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-09-14 09:36:28 +0000
commitc46d5a051934afbc9f76462fe2a1758f030f4e23 (patch)
tree28f70f6645a6bd655f7dc88ff222da3f90f3eb02
parentReleasing progress-linux version 1.0.1-3~dschinn1. (diff)
downloadsphinxcontrib-websupport-c46d5a051934afbc9f76462fe2a1758f030f4e23.zip
sphinxcontrib-websupport-c46d5a051934afbc9f76462fe2a1758f030f4e23.tar.xz
Merging upstream version 1.1.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-x[-rw-r--r--]CHANGES8
-rwxr-xr-x[-rw-r--r--]LICENSE2
-rwxr-xr-x[-rw-r--r--]MANIFEST.in0
-rwxr-xr-x[-rw-r--r--]PKG-INFO12
-rwxr-xr-x[-rw-r--r--]README.rst0
-rwxr-xr-x[-rw-r--r--]setup.cfg8
-rwxr-xr-x[-rw-r--r--]setup.py7
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/__init__.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/__init__.py2
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/builder.py10
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/core.py8
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/errors.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/search/__init__.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/search/nullsearch.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/search/whooshsearch.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/search/xapiansearch.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/storage/__init__.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/storage/differ.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/storage/sqlalchemy_db.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/storage/sqlalchemystorage.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/utils.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/version.py4
-rwxr-xr-x[-rw-r--r--]sphinxcontrib/websupport/writer.py0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib_websupport.egg-info/PKG-INFO12
-rwxr-xr-x[-rw-r--r--]sphinxcontrib_websupport.egg-info/SOURCES.txt0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib_websupport.egg-info/dependency_links.txt0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib_websupport.egg-info/namespace_packages.txt0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib_websupport.egg-info/not-zip-safe2
-rwxr-xr-x[-rw-r--r--]sphinxcontrib_websupport.egg-info/requires.txt0
-rwxr-xr-x[-rw-r--r--]sphinxcontrib_websupport.egg-info/top_level.txt0
-rwxr-xr-xtests/path.py2
-rwxr-xr-x[-rw-r--r--]tests/root/Makefile0
-rwxr-xr-x[-rw-r--r--]tests/root/_static/README0
-rwxr-xr-x[-rw-r--r--]tests/root/_static/excluded.css0
-rwxr-xr-x[-rw-r--r--]tests/root/_static/subdir/foo.css0
-rwxr-xr-x[-rw-r--r--]tests/root/_templates/contentssb.html0
-rwxr-xr-x[-rw-r--r--]tests/root/_templates/customsb.html0
-rwxr-xr-x[-rw-r--r--]tests/root/_templates/layout.html0
-rwxr-xr-x[-rw-r--r--]tests/root/autodoc.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/autodoc_fodder.py0
-rwxr-xr-x[-rw-r--r--]tests/root/autodoc_missing_imports.py0
-rwxr-xr-x[-rw-r--r--]tests/root/bom.po0
-rwxr-xr-x[-rw-r--r--]tests/root/bom.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/conf.py0
-rwxr-xr-x[-rw-r--r--]tests/root/contents.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/en.lproj/localized.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/ext.py0
-rwxr-xr-x[-rw-r--r--]tests/root/extapi.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/extensions.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/footnote.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/images.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/img.foo.pngbin66247 -> 66247 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/img.gifbin24976 -> 24976 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/img.pdfbin141783 -> 141783 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/img.pngbin66247 -> 66247 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/includes.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/lists.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/literal.inc0
-rwxr-xr-x[-rw-r--r--]tests/root/literal_orig.inc0
-rwxr-xr-x[-rw-r--r--]tests/root/markup.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/math.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/metadata.add0
-rwxr-xr-x[-rw-r--r--]tests/root/objects.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/otherext.foo0
-rwxr-xr-x[-rw-r--r--]tests/root/parsermod.py0
-rwxr-xr-x[-rw-r--r--]tests/root/quotes.inc0
-rwxr-xr-x[-rw-r--r--]tests/root/rimg.pngbin120 -> 120 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/robots.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/special/api.h0
-rwxr-xr-x[-rw-r--r--]tests/root/special/code.py0
-rwxr-xr-x[-rw-r--r--]tests/root/subdir.po0
-rwxr-xr-x[-rw-r--r--]tests/root/subdir/excluded.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/subdir/images.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/subdir/img.pngbin66247 -> 66247 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/subdir/include.inc0
-rwxr-xr-x[-rw-r--r--]tests/root/subdir/includes.txt0
-rwxr-xr-x[-rw-r--r--]tests/root/subdir/simg.pngbin66247 -> 66247 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/svgimg.pdfbin141783 -> 141783 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/svgimg.svg0
-rwxr-xr-x[-rw-r--r--]tests/root/tabs.inc0
-rwxr-xr-x[-rw-r--r--]tests/root/templated.css_t0
-rwxr-xr-x[-rw-r--r--]tests/root/test.inc0
-rwxr-xr-x[-rw-r--r--]tests/root/testtheme/layout.html0
-rwxr-xr-x[-rw-r--r--]tests/root/testtheme/static/staticimg.pngbin120 -> 120 bytes
-rwxr-xr-x[-rw-r--r--]tests/root/testtheme/static/statictmpl.html_t0
-rwxr-xr-x[-rw-r--r--]tests/root/testtheme/theme.conf0
-rwxr-xr-x[-rw-r--r--]tests/root/wrongenc.inc0
-rwxr-xr-x[-rw-r--r--]tests/root/ziptheme.zipbin1039 -> 1039 bytes
-rwxr-xr-x[-rw-r--r--]tests/roots/test-searchadapters/conf.py0
-rwxr-xr-x[-rw-r--r--]tests/roots/test-searchadapters/markup.txt0
-rwxr-xr-x[-rw-r--r--]tests/test_searchadapters.py9
-rwxr-xr-x[-rw-r--r--]tests/test_websupport.py4
-rwxr-xr-x[-rw-r--r--]tests/util.py332
-rwxr-xr-x[-rw-r--r--]tox.ini2
94 files changed, 65 insertions, 359 deletions
diff --git a/CHANGES b/CHANGES
index 93d87b2..71d2b37 100644..100755
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+Release 1.1.0 (2018-06-03)
+==========================
+
+* #6 Add compatibility with Sphinx 1.6. Thanks to Dmitry Shachnev.
+* #13 Support testing with Sphinx-1.7.
+* #9 Include license file in the generated wheel package. Thanks to
+ Jon Dufresne.
+
Release 1.0.1 (2017-05-07)
==========================
diff --git a/LICENSE b/LICENSE
index 3b8fd8e..fd9896f 100644..100755
--- a/LICENSE
+++ b/LICENSE
@@ -1,7 +1,7 @@
License for sphinxcontrib-websupport
====================================
-Copyright (c) 2007-2017 by the Sphinx team
+Copyright (c) 2007-2018 by the Sphinx team
(see https://github.com/sphinx-doc/sphinx/blob/master/AUTHORS).
All rights reserved.
diff --git a/MANIFEST.in b/MANIFEST.in
index 4db06ab..4db06ab 100644..100755
--- a/MANIFEST.in
+++ b/MANIFEST.in
diff --git a/PKG-INFO b/PKG-INFO
index 15089b9..60a3ad3 100644..100755
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: sphinxcontrib-websupport
-Version: 1.0.1
+Version: 1.1.0
Summary: Sphinx API for Web Apps
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
@@ -8,7 +8,7 @@ Author-email: georg@python.org
License: BSD
Download-URL: https://pypi.python.org/pypi/sphinxcontrib-websupport
Description:
- sphinxcontrib-webuspport provides a Python API to easily integrate Sphinx
+ sphinxcontrib-websupport provides a Python API to easily integrate Sphinx
documentation into your Web application.
Platform: any
@@ -21,10 +21,16 @@ Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Sphinx
Classifier: Framework :: Sphinx :: Extension
Classifier: Topic :: Documentation
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Provides-Extra: test
diff --git a/README.rst b/README.rst
index c1ab116..c1ab116 100644..100755
--- a/README.rst
+++ b/README.rst
diff --git a/setup.cfg b/setup.cfg
index 4f81bff..425dafd 100644..100755
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,18 +4,20 @@ tag_date = 0
[aliases]
release = egg_info -Db ''
-upload = upload --sign --identity=36580288
[extract_messages]
mapping_file = babel.cfg
output_file = sphinx/locale/sphinx.pot
keywords = _ l_ lazy_gettext
-[wheel]
+[bdist_wheel]
universal = 1
+[metadata]
+license_file = LICENSE
+
[flake8]
max-line-length = 95
ignore = E116,E241,E251
-exclude = .git,.tox,tests/*
+exclude = .git,.tox,.venv,tests/*
diff --git a/setup.py b/setup.py
index c659309..d19d7be 100644..100755
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ import os
from setuptools import setup, find_packages
long_desc = '''
-sphinxcontrib-webuspport provides a Python API to easily integrate Sphinx
+sphinxcontrib-websupport provides a Python API to easily integrate Sphinx
documentation into your Web application.
'''
@@ -49,7 +49,11 @@ setup(
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
+ 'Programming Language :: Python :: 3.4',
+ 'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Framework :: Sphinx',
'Framework :: Sphinx :: Extension',
'Topic :: Documentation',
@@ -58,6 +62,7 @@ setup(
'Topic :: Utilities',
],
platforms='any',
+ python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
packages=find_packages(exclude=['tests']),
include_package_data=True,
extras_require=extras_require,
diff --git a/sphinxcontrib/__init__.py b/sphinxcontrib/__init__.py
index 68c04af..68c04af 100644..100755
--- a/sphinxcontrib/__init__.py
+++ b/sphinxcontrib/__init__.py
diff --git a/sphinxcontrib/websupport/__init__.py b/sphinxcontrib/websupport/__init__.py
index 643ff4a..5d9a382 100644..100755
--- a/sphinxcontrib/websupport/__init__.py
+++ b/sphinxcontrib/websupport/__init__.py
@@ -6,7 +6,7 @@
A Python API to easily integrate Sphinx documentation into Web
applications.
- :copyright: Copyright 2007-2017 by the Sphinx team, see README.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see README.
:license: BSD, see LICENSE for details.
"""
diff --git a/sphinxcontrib/websupport/builder.py b/sphinxcontrib/websupport/builder.py
index d38626e..d942a63 100644..100755
--- a/sphinxcontrib/websupport/builder.py
+++ b/sphinxcontrib/websupport/builder.py
@@ -18,7 +18,9 @@ from docutils.io import StringOutput
from sphinx.jinja2glue import BuiltinTemplateLoader
from sphinx.util.osutil import os_path, relative_uri, ensuredir, copyfile
from sphinx.builders.html import PickleHTMLBuilder
-from sphinx.writers.websupport import WebSupportTranslator
+
+from .writer import WebSupportTranslator
+
if False:
# For type annotation
@@ -34,6 +36,7 @@ class WebSupportBuilder(PickleHTMLBuilder):
name = 'websupport'
versioning_method = 'commentable'
versioning_compare = True # for commentable node's uuid stability.
+ default_translator_class = WebSupportTranslator
def init(self):
# type: () -> None
@@ -54,11 +57,6 @@ class WebSupportBuilder(PickleHTMLBuilder):
self.search = search
self.storage = storage
- def init_translator_class(self):
- # type: () -> None
- if self.translator_class is None:
- self.translator_class = WebSupportTranslator
-
def prepare_writing(self, docnames):
# type: (Iterable[unicode]) -> None
PickleHTMLBuilder.prepare_writing(self, docnames)
diff --git a/sphinxcontrib/websupport/core.py b/sphinxcontrib/websupport/core.py
index 062bf9f..f275aa3 100644..100755
--- a/sphinxcontrib/websupport/core.py
+++ b/sphinxcontrib/websupport/core.py
@@ -42,6 +42,8 @@ class WebSupport(object):
doctreedir=None, # defaults to builddir/doctrees
search=None, # defaults to no search
storage=None, # defaults to SQLite in datadir
+ buildername='websupport',
+ confoverrides={},
status=sys.stdout,
warning=sys.stderr,
moderation_callback=None,
@@ -60,6 +62,9 @@ class WebSupport(object):
self.staticroot = staticroot.strip('/')
self.docroot = docroot.strip('/')
+ self.buildername = buildername
+ self.confoverrides = confoverrides
+
self.status = status
self.warning = warning
self.moderation_callback = moderation_callback
@@ -123,7 +128,8 @@ class WebSupport(object):
from sphinx.application import Sphinx
app = Sphinx(self.srcdir, self.srcdir, self.outdir, self.doctreedir,
- 'websupport', status=self.status, warning=self.warning)
+ self.buildername, self.confoverrides, status=self.status,
+ warning=self.warning)
app.builder.set_webinfo(self.staticdir, self.staticroot, # type: ignore
self.search, self.storage)
diff --git a/sphinxcontrib/websupport/errors.py b/sphinxcontrib/websupport/errors.py
index 893bb1a..893bb1a 100644..100755
--- a/sphinxcontrib/websupport/errors.py
+++ b/sphinxcontrib/websupport/errors.py
diff --git a/sphinxcontrib/websupport/search/__init__.py b/sphinxcontrib/websupport/search/__init__.py
index 4221569..4221569 100644..100755
--- a/sphinxcontrib/websupport/search/__init__.py
+++ b/sphinxcontrib/websupport/search/__init__.py
diff --git a/sphinxcontrib/websupport/search/nullsearch.py b/sphinxcontrib/websupport/search/nullsearch.py
index 5f58379..5f58379 100644..100755
--- a/sphinxcontrib/websupport/search/nullsearch.py
+++ b/sphinxcontrib/websupport/search/nullsearch.py
diff --git a/sphinxcontrib/websupport/search/whooshsearch.py b/sphinxcontrib/websupport/search/whooshsearch.py
index 4d271c9..4d271c9 100644..100755
--- a/sphinxcontrib/websupport/search/whooshsearch.py
+++ b/sphinxcontrib/websupport/search/whooshsearch.py
diff --git a/sphinxcontrib/websupport/search/xapiansearch.py b/sphinxcontrib/websupport/search/xapiansearch.py
index 8776b8b..8776b8b 100644..100755
--- a/sphinxcontrib/websupport/search/xapiansearch.py
+++ b/sphinxcontrib/websupport/search/xapiansearch.py
diff --git a/sphinxcontrib/websupport/storage/__init__.py b/sphinxcontrib/websupport/storage/__init__.py
index 0ffa209..0ffa209 100644..100755
--- a/sphinxcontrib/websupport/storage/__init__.py
+++ b/sphinxcontrib/websupport/storage/__init__.py
diff --git a/sphinxcontrib/websupport/storage/differ.py b/sphinxcontrib/websupport/storage/differ.py
index e2a2b81..e2a2b81 100644..100755
--- a/sphinxcontrib/websupport/storage/differ.py
+++ b/sphinxcontrib/websupport/storage/differ.py
diff --git a/sphinxcontrib/websupport/storage/sqlalchemy_db.py b/sphinxcontrib/websupport/storage/sqlalchemy_db.py
index cc140aa..cc140aa 100644..100755
--- a/sphinxcontrib/websupport/storage/sqlalchemy_db.py
+++ b/sphinxcontrib/websupport/storage/sqlalchemy_db.py
diff --git a/sphinxcontrib/websupport/storage/sqlalchemystorage.py b/sphinxcontrib/websupport/storage/sqlalchemystorage.py
index 6b65c57..6b65c57 100644..100755
--- a/sphinxcontrib/websupport/storage/sqlalchemystorage.py
+++ b/sphinxcontrib/websupport/storage/sqlalchemystorage.py
diff --git a/sphinxcontrib/websupport/utils.py b/sphinxcontrib/websupport/utils.py
index b421003..b421003 100644..100755
--- a/sphinxcontrib/websupport/utils.py
+++ b/sphinxcontrib/websupport/utils.py
diff --git a/sphinxcontrib/websupport/version.py b/sphinxcontrib/websupport/version.py
index a951436..98d8951 100644..100755
--- a/sphinxcontrib/websupport/version.py
+++ b/sphinxcontrib/websupport/version.py
@@ -3,9 +3,9 @@
sphinxcontrib.websupport.version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2007-2017 by the Sphinx team, see README.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see README.
:license: BSD, see LICENSE for details.
"""
-__version__ = '1.0.1'
+__version__ = '1.1.0'
__version_info__ = tuple(map(int, __version__.split('.')))
diff --git a/sphinxcontrib/websupport/writer.py b/sphinxcontrib/websupport/writer.py
index 4a8e753..4a8e753 100644..100755
--- a/sphinxcontrib/websupport/writer.py
+++ b/sphinxcontrib/websupport/writer.py
diff --git a/sphinxcontrib_websupport.egg-info/PKG-INFO b/sphinxcontrib_websupport.egg-info/PKG-INFO
index 15089b9..60a3ad3 100644..100755
--- a/sphinxcontrib_websupport.egg-info/PKG-INFO
+++ b/sphinxcontrib_websupport.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: sphinxcontrib-websupport
-Version: 1.0.1
+Version: 1.1.0
Summary: Sphinx API for Web Apps
Home-page: http://sphinx-doc.org/
Author: Georg Brandl
@@ -8,7 +8,7 @@ Author-email: georg@python.org
License: BSD
Download-URL: https://pypi.python.org/pypi/sphinxcontrib-websupport
Description:
- sphinxcontrib-webuspport provides a Python API to easily integrate Sphinx
+ sphinxcontrib-websupport provides a Python API to easily integrate Sphinx
documentation into your Web application.
Platform: any
@@ -21,10 +21,16 @@ Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
+Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Framework :: Sphinx
Classifier: Framework :: Sphinx :: Extension
Classifier: Topic :: Documentation
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Provides-Extra: test
diff --git a/sphinxcontrib_websupport.egg-info/SOURCES.txt b/sphinxcontrib_websupport.egg-info/SOURCES.txt
index e64822a..e64822a 100644..100755
--- a/sphinxcontrib_websupport.egg-info/SOURCES.txt
+++ b/sphinxcontrib_websupport.egg-info/SOURCES.txt
diff --git a/sphinxcontrib_websupport.egg-info/dependency_links.txt b/sphinxcontrib_websupport.egg-info/dependency_links.txt
index 8b13789..8b13789 100644..100755
--- a/sphinxcontrib_websupport.egg-info/dependency_links.txt
+++ b/sphinxcontrib_websupport.egg-info/dependency_links.txt
diff --git a/sphinxcontrib_websupport.egg-info/namespace_packages.txt b/sphinxcontrib_websupport.egg-info/namespace_packages.txt
index aa75604..aa75604 100644..100755
--- a/sphinxcontrib_websupport.egg-info/namespace_packages.txt
+++ b/sphinxcontrib_websupport.egg-info/namespace_packages.txt
diff --git a/sphinxcontrib_websupport.egg-info/not-zip-safe b/sphinxcontrib_websupport.egg-info/not-zip-safe
index 8b13789..d3f5a12 100644..100755
--- a/sphinxcontrib_websupport.egg-info/not-zip-safe
+++ b/sphinxcontrib_websupport.egg-info/not-zip-safe
@@ -1 +1 @@
-
+
diff --git a/sphinxcontrib_websupport.egg-info/requires.txt b/sphinxcontrib_websupport.egg-info/requires.txt
index d8ef1b5..d8ef1b5 100644..100755
--- a/sphinxcontrib_websupport.egg-info/requires.txt
+++ b/sphinxcontrib_websupport.egg-info/requires.txt
diff --git a/sphinxcontrib_websupport.egg-info/top_level.txt b/sphinxcontrib_websupport.egg-info/top_level.txt
index aa75604..aa75604 100644..100755
--- a/sphinxcontrib_websupport.egg-info/top_level.txt
+++ b/sphinxcontrib_websupport.egg-info/top_level.txt
diff --git a/tests/path.py b/tests/path.py
index 26c2b1b..e6ee33a 100755
--- a/tests/path.py
+++ b/tests/path.py
@@ -4,7 +4,7 @@
path
~~~~
- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
diff --git a/tests/root/Makefile b/tests/root/Makefile
index 85a93bc..85a93bc 100644..100755
--- a/tests/root/Makefile
+++ b/tests/root/Makefile
diff --git a/tests/root/_static/README b/tests/root/_static/README
index 9e1ec35..9e1ec35 100644..100755
--- a/tests/root/_static/README
+++ b/tests/root/_static/README
diff --git a/tests/root/_static/excluded.css b/tests/root/_static/excluded.css
index 03c941a..03c941a 100644..100755
--- a/tests/root/_static/excluded.css
+++ b/tests/root/_static/excluded.css
diff --git a/tests/root/_static/subdir/foo.css b/tests/root/_static/subdir/foo.css
index 9427981..9427981 100644..100755
--- a/tests/root/_static/subdir/foo.css
+++ b/tests/root/_static/subdir/foo.css
diff --git a/tests/root/_templates/contentssb.html b/tests/root/_templates/contentssb.html
index d0c276a..d0c276a 100644..100755
--- a/tests/root/_templates/contentssb.html
+++ b/tests/root/_templates/contentssb.html
diff --git a/tests/root/_templates/customsb.html b/tests/root/_templates/customsb.html
index 0cd6735..0cd6735 100644..100755
--- a/tests/root/_templates/customsb.html
+++ b/tests/root/_templates/customsb.html
diff --git a/tests/root/_templates/layout.html b/tests/root/_templates/layout.html
index db685b0..db685b0 100644..100755
--- a/tests/root/_templates/layout.html
+++ b/tests/root/_templates/layout.html
diff --git a/tests/root/autodoc.txt b/tests/root/autodoc.txt
index aa0dffb..aa0dffb 100644..100755
--- a/tests/root/autodoc.txt
+++ b/tests/root/autodoc.txt
diff --git a/tests/root/autodoc_fodder.py b/tests/root/autodoc_fodder.py
index e5fd741..e5fd741 100644..100755
--- a/tests/root/autodoc_fodder.py
+++ b/tests/root/autodoc_fodder.py
diff --git a/tests/root/autodoc_missing_imports.py b/tests/root/autodoc_missing_imports.py
index 0901ce8..0901ce8 100644..100755
--- a/tests/root/autodoc_missing_imports.py
+++ b/tests/root/autodoc_missing_imports.py
diff --git a/tests/root/bom.po b/tests/root/bom.po
index c6025eb..c6025eb 100644..100755
--- a/tests/root/bom.po
+++ b/tests/root/bom.po
diff --git a/tests/root/bom.txt b/tests/root/bom.txt
index 3fea824..3fea824 100644..100755
--- a/tests/root/bom.txt
+++ b/tests/root/bom.txt
diff --git a/tests/root/conf.py b/tests/root/conf.py
index a23aec4..a23aec4 100644..100755
--- a/tests/root/conf.py
+++ b/tests/root/conf.py
diff --git a/tests/root/contents.txt b/tests/root/contents.txt
index d5ff241..d5ff241 100644..100755
--- a/tests/root/contents.txt
+++ b/tests/root/contents.txt
diff --git a/tests/root/en.lproj/localized.txt b/tests/root/en.lproj/localized.txt
index 20e1b2b..20e1b2b 100644..100755
--- a/tests/root/en.lproj/localized.txt
+++ b/tests/root/en.lproj/localized.txt
diff --git a/tests/root/ext.py b/tests/root/ext.py
index 34a73cb..34a73cb 100644..100755
--- a/tests/root/ext.py
+++ b/tests/root/ext.py
diff --git a/tests/root/extapi.txt b/tests/root/extapi.txt
index 4728e3d..4728e3d 100644..100755
--- a/tests/root/extapi.txt
+++ b/tests/root/extapi.txt
diff --git a/tests/root/extensions.txt b/tests/root/extensions.txt
index 96b1f8e..96b1f8e 100644..100755
--- a/tests/root/extensions.txt
+++ b/tests/root/extensions.txt
diff --git a/tests/root/footnote.txt b/tests/root/footnote.txt
index dc5e0b0..dc5e0b0 100644..100755
--- a/tests/root/footnote.txt
+++ b/tests/root/footnote.txt
diff --git a/tests/root/images.txt b/tests/root/images.txt
index 55bc6f6..55bc6f6 100644..100755
--- a/tests/root/images.txt
+++ b/tests/root/images.txt
diff --git a/tests/root/img.foo.png b/tests/root/img.foo.png
index a97e86d..a97e86d 100644..100755
--- a/tests/root/img.foo.png
+++ b/tests/root/img.foo.png
Binary files differ
diff --git a/tests/root/img.gif b/tests/root/img.gif
index 8f02686..8f02686 100644..100755
--- a/tests/root/img.gif
+++ b/tests/root/img.gif
Binary files differ
diff --git a/tests/root/img.pdf b/tests/root/img.pdf
index cacbd85..cacbd85 100644..100755
--- a/tests/root/img.pdf
+++ b/tests/root/img.pdf
Binary files differ
diff --git a/tests/root/img.png b/tests/root/img.png
index a97e86d..a97e86d 100644..100755
--- a/tests/root/img.png
+++ b/tests/root/img.png
Binary files differ
diff --git a/tests/root/includes.txt b/tests/root/includes.txt
index e921a96..e921a96 100644..100755
--- a/tests/root/includes.txt
+++ b/tests/root/includes.txt
diff --git a/tests/root/lists.txt b/tests/root/lists.txt
index 1fa2d11..1fa2d11 100644..100755
--- a/tests/root/lists.txt
+++ b/tests/root/lists.txt
diff --git a/tests/root/literal.inc b/tests/root/literal.inc
index 694f15e..694f15e 100644..100755
--- a/tests/root/literal.inc
+++ b/tests/root/literal.inc
diff --git a/tests/root/literal_orig.inc b/tests/root/literal_orig.inc
index 14fd214..14fd214 100644..100755
--- a/tests/root/literal_orig.inc
+++ b/tests/root/literal_orig.inc
diff --git a/tests/root/markup.txt b/tests/root/markup.txt
index 714dabe..714dabe 100644..100755
--- a/tests/root/markup.txt
+++ b/tests/root/markup.txt
diff --git a/tests/root/math.txt b/tests/root/math.txt
index 5a209be..5a209be 100644..100755
--- a/tests/root/math.txt
+++ b/tests/root/math.txt
diff --git a/tests/root/metadata.add b/tests/root/metadata.add
index 821816a..821816a 100644..100755
--- a/tests/root/metadata.add
+++ b/tests/root/metadata.add
diff --git a/tests/root/objects.txt b/tests/root/objects.txt
index 7e9bc15..7e9bc15 100644..100755
--- a/tests/root/objects.txt
+++ b/tests/root/objects.txt
diff --git a/tests/root/otherext.foo b/tests/root/otherext.foo
index 531ea29..531ea29 100644..100755
--- a/tests/root/otherext.foo
+++ b/tests/root/otherext.foo
diff --git a/tests/root/parsermod.py b/tests/root/parsermod.py
index 3e5330a..3e5330a 100644..100755
--- a/tests/root/parsermod.py
+++ b/tests/root/parsermod.py
diff --git a/tests/root/quotes.inc b/tests/root/quotes.inc
index 276cc56..276cc56 100644..100755
--- a/tests/root/quotes.inc
+++ b/tests/root/quotes.inc
diff --git a/tests/root/rimg.png b/tests/root/rimg.png
index fda6cd2..fda6cd2 100644..100755
--- a/tests/root/rimg.png
+++ b/tests/root/rimg.png
Binary files differ
diff --git a/tests/root/robots.txt b/tests/root/robots.txt
index 1b425ee..1b425ee 100644..100755
--- a/tests/root/robots.txt
+++ b/tests/root/robots.txt
diff --git a/tests/root/special/api.h b/tests/root/special/api.h
index 7c137e0..7c137e0 100644..100755
--- a/tests/root/special/api.h
+++ b/tests/root/special/api.h
diff --git a/tests/root/special/code.py b/tests/root/special/code.py
index b7934b2..b7934b2 100644..100755
--- a/tests/root/special/code.py
+++ b/tests/root/special/code.py
diff --git a/tests/root/subdir.po b/tests/root/subdir.po
index f515f22..f515f22 100644..100755
--- a/tests/root/subdir.po
+++ b/tests/root/subdir.po
diff --git a/tests/root/subdir/excluded.txt b/tests/root/subdir/excluded.txt
index 5df3139..5df3139 100644..100755
--- a/tests/root/subdir/excluded.txt
+++ b/tests/root/subdir/excluded.txt
diff --git a/tests/root/subdir/images.txt b/tests/root/subdir/images.txt
index f2adf88..f2adf88 100644..100755
--- a/tests/root/subdir/images.txt
+++ b/tests/root/subdir/images.txt
diff --git a/tests/root/subdir/img.png b/tests/root/subdir/img.png
index a97e86d..a97e86d 100644..100755
--- a/tests/root/subdir/img.png
+++ b/tests/root/subdir/img.png
Binary files differ
diff --git a/tests/root/subdir/include.inc b/tests/root/subdir/include.inc
index 1211300..1211300 100644..100755
--- a/tests/root/subdir/include.inc
+++ b/tests/root/subdir/include.inc
diff --git a/tests/root/subdir/includes.txt b/tests/root/subdir/includes.txt
index 627dcfb..627dcfb 100644..100755
--- a/tests/root/subdir/includes.txt
+++ b/tests/root/subdir/includes.txt
diff --git a/tests/root/subdir/simg.png b/tests/root/subdir/simg.png
index a97e86d..a97e86d 100644..100755
--- a/tests/root/subdir/simg.png
+++ b/tests/root/subdir/simg.png
Binary files differ
diff --git a/tests/root/svgimg.pdf b/tests/root/svgimg.pdf
index cacbd85..cacbd85 100644..100755
--- a/tests/root/svgimg.pdf
+++ b/tests/root/svgimg.pdf
Binary files differ
diff --git a/tests/root/svgimg.svg b/tests/root/svgimg.svg
index 10e035b..10e035b 100644..100755
--- a/tests/root/svgimg.svg
+++ b/tests/root/svgimg.svg
diff --git a/tests/root/tabs.inc b/tests/root/tabs.inc
index 20b5182..20b5182 100644..100755
--- a/tests/root/tabs.inc
+++ b/tests/root/tabs.inc
diff --git a/tests/root/templated.css_t b/tests/root/templated.css_t
index 72ddb80..72ddb80 100644..100755
--- a/tests/root/templated.css_t
+++ b/tests/root/templated.css_t
diff --git a/tests/root/test.inc b/tests/root/test.inc
index 4773390..4773390 100644..100755
--- a/tests/root/test.inc
+++ b/tests/root/test.inc
diff --git a/tests/root/testtheme/layout.html b/tests/root/testtheme/layout.html
index 81372be..81372be 100644..100755
--- a/tests/root/testtheme/layout.html
+++ b/tests/root/testtheme/layout.html
diff --git a/tests/root/testtheme/static/staticimg.png b/tests/root/testtheme/static/staticimg.png
index fda6cd2..fda6cd2 100644..100755
--- a/tests/root/testtheme/static/staticimg.png
+++ b/tests/root/testtheme/static/staticimg.png
Binary files differ
diff --git a/tests/root/testtheme/static/statictmpl.html_t b/tests/root/testtheme/static/statictmpl.html_t
index 4ab292b..4ab292b 100644..100755
--- a/tests/root/testtheme/static/statictmpl.html_t
+++ b/tests/root/testtheme/static/statictmpl.html_t
diff --git a/tests/root/testtheme/theme.conf b/tests/root/testtheme/theme.conf
index a877673..a877673 100644..100755
--- a/tests/root/testtheme/theme.conf
+++ b/tests/root/testtheme/theme.conf
diff --git a/tests/root/wrongenc.inc b/tests/root/wrongenc.inc
index 700f613..700f613 100644..100755
--- a/tests/root/wrongenc.inc
+++ b/tests/root/wrongenc.inc
diff --git a/tests/root/ziptheme.zip b/tests/root/ziptheme.zip
index 8a246ed..8a246ed 100644..100755
--- a/tests/root/ziptheme.zip
+++ b/tests/root/ziptheme.zip
Binary files differ
diff --git a/tests/roots/test-searchadapters/conf.py b/tests/roots/test-searchadapters/conf.py
index ade976a..ade976a 100644..100755
--- a/tests/roots/test-searchadapters/conf.py
+++ b/tests/roots/test-searchadapters/conf.py
diff --git a/tests/roots/test-searchadapters/markup.txt b/tests/roots/test-searchadapters/markup.txt
index 77f245a..77f245a 100644..100755
--- a/tests/roots/test-searchadapters/markup.txt
+++ b/tests/roots/test-searchadapters/markup.txt
diff --git a/tests/test_searchadapters.py b/tests/test_searchadapters.py
index 79109db..ed34291 100644..100755
--- a/tests/test_searchadapters.py
+++ b/tests/test_searchadapters.py
@@ -5,16 +5,17 @@
Test the Web Support Package search adapters.
- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from six import StringIO
+import pytest
from sphinx.websupport import WebSupport
from test_websupport import sqlalchemy_missing
-from util import rootdir, tempdir, skip_if, skip_unless_importable
+from util import rootdir, tempdir, skip_unless_importable
def teardown_module():
@@ -58,12 +59,12 @@ def search_adapter_helper(adapter):
@skip_unless_importable('xapian', 'needs xapian bindings installed')
-@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@pytest.mark.skipif(sqlalchemy_missing, reason='needs sqlalchemy')
def test_xapian():
search_adapter_helper('xapian')
@skip_unless_importable('whoosh', 'needs whoosh package installed')
-@skip_if(sqlalchemy_missing, 'needs sqlalchemy')
+@pytest.mark.skipif(sqlalchemy_missing, reason='needs sqlalchemy')
def test_whoosh():
search_adapter_helper('whoosh')
diff --git a/tests/test_websupport.py b/tests/test_websupport.py
index 91f67bf..00594c6 100644..100755
--- a/tests/test_websupport.py
+++ b/tests/test_websupport.py
@@ -5,7 +5,7 @@
Test the Web Support Package
- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -15,7 +15,7 @@ from sphinx.websupport.errors import DocumentNotFoundError, \
from sphinx.websupport.storage import StorageBackend
from sphinx.websupport.storage.differ import CombinedHtmlDiff
try:
- from sphinx.websupport.storage.sqlalchemystorage import Session, \
+ from sphinxcontrib.websupport.storage.sqlalchemystorage import Session, \
Comment, CommentVote
from sphinx.websupport.storage.sqlalchemy_db import Node
sqlalchemy_missing = False
diff --git a/tests/util.py b/tests/util.py
index b463629..ae46525 100644..100755
--- a/tests/util.py
+++ b/tests/util.py
@@ -3,95 +3,31 @@
Sphinx test suite utilities
~~~~~~~~~~~~~~~~~~~~~~~~~~~
- :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
+ :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
-import re
-import sys
import tempfile
-import warnings
-from functools import wraps
-from xml.etree import ElementTree
-
-from six import string_types
-from six import StringIO
import pytest
-from docutils import nodes
-from docutils.parsers.rst import directives, roles
-
-from sphinx import application
-from sphinx.builders.latex import LaTeXBuilder
-from sphinx.ext.autodoc import AutoDirective
-from sphinx.pycode import ModuleAnalyzer
-from sphinx.deprecation import RemovedInSphinx17Warning
-
from path import path
__all__ = [
'rootdir', 'tempdir',
- 'skip_unless_importable', 'Struct',
- 'SphinxTestApp',
- 'path',
- 'remove_unicode_literals',
+ 'skip_unless_importable',
]
-rootdir = path(os.path.dirname(__file__) or '.').abspath()
+rootdir = path(__file__).abspath().parent
if 'SPHINX_TEST_TEMPDIR' in os.environ:
tempdir = path(os.environ['SPHINX_TEST_TEMPDIR']).abspath()
else:
tempdir = path(tempfile.mkdtemp()).abspath()
-def assert_re_search(regex, text, flags=0):
- if not re.search(regex, text, flags):
- assert False, '%r did not match %r' % (regex, text)
-
-
-def assert_not_re_search(regex, text, flags=0):
- if re.search(regex, text, flags):
- assert False, '%r did match %r' % (regex, text)
-
-
-def assert_startswith(thing, prefix):
- if not thing.startswith(prefix):
- assert False, '%r does not start with %r' % (thing, prefix)
-
-
-def assert_node(node, cls=None, xpath="", **kwargs):
- if cls:
- if isinstance(cls, list):
- assert_node(node, cls[0], xpath=xpath, **kwargs)
- if cls[1:]:
- if isinstance(cls[1], tuple):
- assert_node(node, cls[1], xpath=xpath, **kwargs)
- else:
- assert len(node) == 1, \
- 'The node%s has %d child nodes, not one' % (xpath, len(node))
- assert_node(node[0], cls[1:], xpath=xpath + "[0]", **kwargs)
- elif isinstance(cls, tuple):
- assert len(node) == len(cls), \
- 'The node%s has %d child nodes, not %r' % (xpath, len(node), len(cls))
- for i, nodecls in enumerate(cls):
- path = xpath + "[%d]" % i
- assert_node(node[i], nodecls, xpath=path, **kwargs)
- elif isinstance(cls, string_types):
- assert node == cls, 'The node %r is not %r: %r' % (xpath, cls, node)
- else:
- assert isinstance(node, cls), \
- 'The node%s is not subclass of %r: %r' % (xpath, cls, node)
-
- for key, value in kwargs.items():
- assert key in node, 'The node%s does not have %r attribute: %r' % (xpath, key, node)
- assert node[key] == value, \
- 'The node%s[%s] is not %r: %r' % (xpath, key, value, node[key])
-
-
def skip_unless_importable(module, msg=None):
"""Decorator to skip test if module is not importable."""
try:
@@ -100,265 +36,3 @@ def skip_unless_importable(module, msg=None):
return pytest.mark.skipif(True, reason=(msg or 'conditional skip'))
else:
return pytest.mark.skipif(False, reason=(msg or 'conditional skip'))
-
-
-def etree_parse(path):
- with warnings.catch_warnings(record=False):
- warnings.filterwarnings("ignore", category=DeprecationWarning)
- return ElementTree.parse(path)
-
-
-class Struct(object):
- def __init__(self, **kwds):
- self.__dict__.update(kwds)
-
-
-class SphinxTestApp(application.Sphinx):
- """
- A subclass of :class:`Sphinx` that runs on the test root, with some
- better default values for the initialization parameters.
- """
-
- def __init__(self, buildername='html', testroot=None, srcdir=None,
- freshenv=False, confoverrides=None, status=None, warning=None,
- tags=None, docutilsconf=None):
- if testroot is None:
- defaultsrcdir = 'root'
- testroot = rootdir / 'root'
- else:
- defaultsrcdir = 'test-' + testroot
- testroot = rootdir / 'roots' / ('test-' + testroot)
- if srcdir is None:
- srcdir = tempdir / defaultsrcdir
- else:
- srcdir = tempdir / srcdir
-
- if not srcdir.exists():
- testroot.copytree(srcdir)
-
- if docutilsconf is not None:
- (srcdir / 'docutils.conf').write_text(docutilsconf)
-
- builddir = srcdir / '_build'
-# if confdir is None:
- confdir = srcdir
-# if outdir is None:
- outdir = builddir.joinpath(buildername)
- if not outdir.isdir():
- outdir.makedirs()
-# if doctreedir is None:
- doctreedir = builddir.joinpath('doctrees')
- if not doctreedir.isdir():
- doctreedir.makedirs()
- if confoverrides is None:
- confoverrides = {}
-# if warningiserror is None:
- warningiserror = False
-
- self._saved_path = sys.path[:]
- self._saved_directives = directives._directives.copy()
- self._saved_roles = roles._roles.copy()
-
- self._saved_nodeclasses = set(v for v in dir(nodes.GenericNodeVisitor)
- if v.startswith('visit_'))
-
- try:
- application.Sphinx.__init__(self, srcdir, confdir, outdir, doctreedir,
- buildername, confoverrides, status, warning,
- freshenv, warningiserror, tags)
- except:
- self.cleanup()
- raise
-
- def cleanup(self, doctrees=False):
- AutoDirective._registry.clear()
- ModuleAnalyzer.cache.clear()
- LaTeXBuilder.usepackages = []
- sys.path[:] = self._saved_path
- sys.modules.pop('autodoc_fodder', None)
- directives._directives = self._saved_directives
- roles._roles = self._saved_roles
- for method in dir(nodes.GenericNodeVisitor):
- if method.startswith('visit_') and \
- method not in self._saved_nodeclasses:
- delattr(nodes.GenericNodeVisitor, 'visit_' + method[6:])
- delattr(nodes.GenericNodeVisitor, 'depart_' + method[6:])
-
- def __repr__(self):
- return '<%s buildername=%r>' % (self.__class__.__name__, self.builder.name)
-
-
-_unicode_literals_re = re.compile(r'u(".*?")|u(\'.*?\')')
-
-
-def remove_unicode_literals(s):
- return _unicode_literals_re.sub(lambda x: x.group(1) or x.group(2), s)
-
-
-def find_files(root, suffix=None):
- for dirpath, dirs, files in os.walk(root, followlinks=True):
- dirpath = path(dirpath)
- for f in [f for f in files if not suffix or f.endswith(suffix)]:
- fpath = dirpath / f
- yield os.path.relpath(fpath, root)
-
-
-def strip_escseq(text):
- return re.sub('\x1b.*?m', '', text)
-
-
-# #############################################
-# DEPRECATED implementations
-
-
-def gen_with_app(*args, **kwargs):
- """
- **DEPRECATED**: use pytest.mark.parametrize instead.
-
- Decorate a test generator to pass a SphinxTestApp as the first argument to
- the test generator when it's executed.
- """
- def generator(func):
- @wraps(func)
- def deco(*args2, **kwargs2):
- status, warning = StringIO(), StringIO()
- kwargs['status'] = status
- kwargs['warning'] = warning
- app = SphinxTestApp(*args, **kwargs)
- try:
- for item in func(app, status, warning, *args2, **kwargs2):
- yield item
- finally:
- app.cleanup()
- return deco
- return generator
-
-
-def skip_if(condition, msg=None):
- """
- **DEPRECATED**: use pytest.mark.skipif instead.
-
- Decorator to skip test if condition is true.
- """
- return pytest.mark.skipif(condition, reason=(msg or 'conditional skip'))
-
-
-def skip_unless(condition, msg=None):
- """
- **DEPRECATED**: use pytest.mark.skipif instead.
-
- Decorator to skip test if condition is false.
- """
- return pytest.mark.skipif(not condition, reason=(msg or 'conditional skip'))
-
-
-def with_tempdir(func):
- """
- **DEPRECATED**: use tempdir fixture instead.
- """
- return func
-
-
-def raises(exc, func, *args, **kwds):
- """
- **DEPRECATED**: use pytest.raises instead.
-
- Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*.
- """
- with pytest.raises(exc):
- func(*args, **kwds)
-
-
-def raises_msg(exc, msg, func, *args, **kwds):
- """
- **DEPRECATED**: use pytest.raises instead.
-
- Raise AssertionError if ``func(*args, **kwds)`` does not raise *exc*,
- and check if the message contains *msg*.
- """
- with pytest.raises(exc) as excinfo:
- func(*args, **kwds)
- assert msg in str(excinfo.value)
-
-
-def assert_true(v1, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- assert v1, msg
-
-
-def assert_equal(v1, v2, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- assert v1 == v2, msg
-
-
-def assert_in(x, thing, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- if x not in thing:
- assert False, msg or '%r is not in %r' % (x, thing)
-
-
-def assert_not_in(x, thing, msg=''):
- """
- **DEPRECATED**: use assert instead.
- """
- if x in thing:
- assert False, msg or '%r is in %r' % (x, thing)
-
-
-class ListOutput(object):
- """
- File-like object that collects written text in a list.
- """
- def __init__(self, name):
- self.name = name
- self.content = []
-
- def reset(self):
- del self.content[:]
-
- def write(self, text):
- self.content.append(text)
-
-
-# **DEPRECATED**: use pytest.skip instead.
-SkipTest = pytest.skip.Exception
-
-
-class _DeprecationWrapper(object):
- def __init__(self, mod, deprecated):
- self._mod = mod
- self._deprecated = deprecated
-
- def __getattr__(self, attr):
- if attr in self._deprecated:
- obj, instead = self._deprecated[attr]
- warnings.warn("tests/util.py::%s is deprecated and will be "
- "removed in Sphinx 1.7, please use %s instead."
- % (attr, instead),
- RemovedInSphinx17Warning, stacklevel=2)
- return obj
- return getattr(self._mod, attr)
-
-
-sys.modules[__name__] = _DeprecationWrapper(sys.modules[__name__], dict( # type: ignore
- with_app=(pytest.mark.sphinx, 'pytest.mark.sphinx'),
- TestApp=(SphinxTestApp, 'SphinxTestApp'),
- gen_with_app=(gen_with_app, 'pytest.mark.parametrize'),
- skip_if=(skip_if, 'pytest.skipif'),
- skip_unless=(skip_unless, 'pytest.skipif'),
- with_tempdir=(with_tempdir, 'tmpdir pytest fixture'),
- raises=(raises, 'pytest.raises'),
- raises_msg=(raises_msg, 'pytest.raises'),
- assert_true=(assert_true, 'assert'),
- assert_equal=(assert_equal, 'assert'),
- assert_in=(assert_in, 'assert'),
- assert_not_in=(assert_not_in, 'assert'),
- ListOutput=(ListOutput, 'StringIO'),
- SkipTest=(SkipTest, 'pytest.skip'),
-))
diff --git a/tox.ini b/tox.ini
index e65a98a..1f0dc3c 100644..100755
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist=flake8,py27,py35,py36
+envlist=flake8,py27,py34,py35,py36
[testenv]
deps=