Skip to content

Commit 1f2aaf3

Browse files
author
Ali Afshar
committed
Merge pull request #127 from tseaver/expand_testing
Set up local machine test automation with tox.
2 parents af92e74 + eb8e370 commit 1f2aaf3

File tree

3 files changed

+38
-2
lines changed

3 files changed

+38
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ docs/_build
4141

4242
# Virtual environment
4343
env/
44+
coverage.xml

docs/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525

2626
# Add any Sphinx extension module names here, as strings. They can be extensions
2727
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
28-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary',
29-
'sphinx.ext.todo', 'sphinx.ext.viewcode']
28+
extensions = [
29+
'sphinx.ext.autodoc',
30+
'sphinx.ext.autosummary',
31+
'sphinx.ext.todo',
32+
'sphinx.ext.viewcode',
33+
]
3034

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

tox.ini

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[tox]
2+
envlist =
3+
py26,py27,cover,docs
4+
# TODO: add py32,py33,py34
5+
6+
[testenv]
7+
commands =
8+
nosetests
9+
deps =
10+
nose
11+
unittest2
12+
13+
[testenv:cover]
14+
basepython =
15+
python2.7
16+
commands =
17+
nosetests --with-xunit --with-xcoverage --cover-package=gcloud --nocapture --cover-erase
18+
deps =
19+
nose
20+
unittest2
21+
coverage
22+
nosexcover
23+
24+
[testenv:docs]
25+
basepython =
26+
python2.7
27+
commands =
28+
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
29+
# sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
30+
deps =
31+
Sphinx

0 commit comments

Comments
 (0)