Skip to content

Commit

Permalink
Add doc tests and spelling tests
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Heimes <cheimes@redhat.com>
  • Loading branch information
Christian Heimes committed Nov 28, 2017
1 parent 1626749 commit 92bd2e7
Show file tree
Hide file tree
Showing 4 changed files with 200 additions and 11 deletions.
36 changes: 26 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
language: python

python:
- '2.7'
- '3.3'
- '3.4'
- '3.5'
- '3.6'
# Note: when updating Python versions, also change setup.py and tox.ini

sudo: false

cache: pip
Expand All @@ -17,9 +9,33 @@ addons:
packages:
- ldap-utils
- slapd
- enchant

env:
- WITH_GCOV=1
# Note: when updating Python versions, also change setup.py and tox.ini
matrix:
include:
- python: 2.7
env:
- TOXENV=py27
- WITH_GCOV=1
- python: 3.3
env:
- TOXENV=py33
- WITH_GCOV=1
- python: 3.4
env:
- TOXENV=py34
- WITH_GCOV=1
- python: 3.5
env:
- TOXENV=py35
- WITH_GCOV=1
- python: 3.6
env:
- TOXENV=py36
- WITH_GCOV=1
- python: 3.6
env: TOXENV=doc

install:
- pip install "pip>=7.1.0"
Expand Down
7 changes: 7 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc']

try:
import sphinxcontrib.spelling
except ImportError:
pass
else:
extensions.append('sphinxcontrib.spelling')

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']

Expand Down
151 changes: 151 additions & 0 deletions Doc/spelling_wordlist.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
args
async
attr
attrlist
attrList
attrs
attrsonly
attrsOnly
attrtype
authzId
automagically
backend
behaviour
BER
bindname
boolean
booleanValue
Bytestrings
cancelled
canonicalization
cb
cfg
changeNumber
changesOnly
changeType
changeTypes
cidict
clientctrls
conf
Continously
controlType
controlValue
criticality
cryptographic
cyrus
defresult
dereferenced
dereferencing
desc
directoryOperation
distinguished
distributedOperation
dit
dn
DN
dSAOperation
encodedControlValue
encodedResponseValue
extype
exvalue
favour
filterstr
filterStr
formatOID
func
heimdal
hostport
hrefTarget
hrefText
ignoreResultsNumber
integerValue
Interoperability
isn
Keepalive
Kerberos
keyerror
knownLDAPControls
kwarg
ldap
ldapadd
ldapControls
ldapControlTuples
ldapdelete
ldapi
LDAPObject
ldaps
ldapurl
ldapwhoami
ldif
LDIFWriter
libldap
libs
Libs
modlist
modrdn
msgid
multi
nameoroid
nots
Novell
objectClass
oc
oid
oids
openldap
postalAddress
pre
previousDN
processResultsCount
Proxied
py
rdn
reentrant
refmodule
refreshAndPersist
refreshDeletes
refreshOnly
requestName
requestValue
resiter
respvalue
ResultProcessor
returnECs
ruleid
rundir
sasl
searchRoot
searchScope
sed
serverctrls
sessionSourceIp
sessionSourceName
sessionTrackingIdentifier
sizelimit
slapd
stderr
stdout
str
Subclasses
subentry
subschema
substr
subtree
syncrepl
syntaxes
timelimit
tracebacks
tuple
tuples
UDP
Umich
unparsing
unsigend
uri
urlPrefix
urlscheme
userApplications
userPassword
usr
uuids
whitespace
17 changes: 16 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

[tox]
# Note: when updating Python versions, also change setup.py and .travis.yml
envlist = py27,py33,py34,py35,py36,coverage-report
envlist = py27,py33,py34,py35,py36,doc,coverage-report

[testenv]
deps = coverage
Expand All @@ -31,3 +31,18 @@ commands =
{envpython} -m coverage combine
{envpython} -m coverage report --show-missing
{envpython} -m coverage html

[testenv:doc]
basepython = python3
deps =
docutils
markdown
sphinx
sphinxcontrib-spelling
commands =
{envpython} setup.py check --restructuredtext --metadata --strict
{envpython} -m markdown README -f {envtmpdir}/README.html
{envpython} -m sphinx -v -W -b html -d {envtmpdir}/doctrees \
{toxinidir}/Doc {envtmpdir}/html
{envpython} -m sphinx -v -W -b spelling -d {envtmpdir}/doctrees \
{toxinidir}/Doc {envtmpdir}/spelling

0 comments on commit 92bd2e7

Please sign in to comment.