summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2017-09-11 07:14:45 -0500
committerJason Madden <jamadden@gmail.com>2017-09-11 07:14:45 -0500
commit0a852da59af04f98c50e0cbd8fbd68f2ab5fefbe (patch)
tree757802e6c068db6a17a7fb93a07141994e294e84
parent2f51b299dd65d4580564695e146fcca83ed945a7 (diff)
downloadzope-security-0a852da59af04f98c50e0cbd8fbd68f2ab5fefbe.tar.gz
Add test environments for ZOPE_WATCH_CHECKERS
They cover both the pure-python and C cases. This modified two existing test environments, but without loss of test coverage (since PyPy will always cover the pure-python case).
-rw-r--r--.travis.yml6
-rw-r--r--docs/conf.py34
-rw-r--r--tox.ini9
3 files changed, 39 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index c38e00c..76848c2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,9 +9,11 @@ matrix:
- python: pypy
- python: pypy3
- python: 2.7
- env: PURE_PYTHON=1
+ env:
+ - PURE_PYTHON=1
+ - ZOPE_WATCH_CHECKERS=1
- python: 3.4
- env: PURE_PYTHON=1
+ env: ZOPE_WATCH_CHECKERS=1
install:
- pip install -U pip setuptools
- pip install -U coveralls coverage
diff --git a/docs/conf.py b/docs/conf.py
index 2bcdf49..caabf00 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -11,8 +11,16 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import os
+import sys
+import pkg_resources
+sys.path.append(os.path.abspath('../src'))
+rqmt = pkg_resources.require('zope.security')[0]
+
+# We can't have ZOPE_WATCH_CHECKERS set because it interferes
+# with doctests
+os.environ['ZOPE_WATCH_CHECKERS'] = '0'
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -28,6 +36,7 @@ import sys, os
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
+ 'sphinx.ext.extlinks',
'sphinx.ext.intersphinx',
'sphinx.ext.viewcode',
'repoze.sphinx.autointerface',
@@ -54,9 +63,9 @@ copyright = u'2012, Zope Foundation Contributors <zope-dev@zope.org>'
# built documents.
#
# The short X.Y version.
-version = '4.0'
+version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags.
-release = '4.0dev'
+release = rqmt.version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -249,4 +258,21 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'http://docs.python.org/': None}
+intersphinx_mapping = {
+ 'https://docs.python.org/': None,
+ 'https://zopeinterface.readthedocs.io/en/latest': None,
+ 'https://zopeproxy.readthedocs.io/en/latest': None,
+ 'https://zopeschema.readthedocs.io/en/latest': None,
+}
+
+extlinks = {'issue': ('https://github.com/zopefoundation/zope.datetime/issues/%s',
+ 'issue #'),
+ 'pr': ('https://github.com/zopefoundation/zope.datetime/pull/%s',
+ 'pull request #')}
+
+autodoc_default_flags = [
+ 'members',
+ 'show-inheritance',
+]
+autoclass_content = 'both'
+autodoc_member_order = 'bysource'
diff --git a/tox.ini b/tox.ini
index b39940b..36a065c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,7 @@ envlist =
# Jython support pending 2.7 support, due 2012-07-15 or so. See:
# http://fwierzbicki.blogspot.com/2012/03/adconion-to-fund-jython-27.html
# py27,pypy,jython,py33,coverage,docs
- py27,py27-pure,pypy,pypy3,py34-pure,py34,py35,py36,coverage,docs
+ py27,py27-watch,pypy,pypy3,py34-watch,py34,py35,py36,coverage,docs
[testenv]
commands =
@@ -12,18 +12,19 @@ commands =
deps =
.[test,docs]
-[testenv:py27-pure]
+[testenv:py27-watch]
basepython =
python2.7
setenv =
PURE_PYTHON = 1
+ ZOPE_WATCH_CHECKERS = 1
PIP_CACHE_DIR = {envdir}/.cache
-[testenv:py34-pure]
+[testenv:py34-watch]
basepython =
python3.4
setenv =
- PURE_PYTHON = 1
+ ZOPE_WATCH_CHECKERS = 1
PIP_CACHE_DIR = {envdir}/.cache
[testenv:coverage]