From e2de4ba82173cd6d798ceb1964fd99b7bc84c3fd Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 26 Aug 2014 14:16:41 -0400 Subject: [PATCH 1/7] Add 'setup.cfg' to allow persistent configuration of nose options. --- setup.cfg | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 000000000000..2eb73f812443 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[nosetests] +match=^test +where=gcloud +nocapture=1 +cover-package=gcloud +cover-erase=1 From 89f0a85bc582379df869d440baa958ccc1c378ca Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 26 Aug 2014 14:21:52 -0400 Subject: [PATCH 2/7] One extension per line. --- docs/conf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 2c13b61fdc5a..c781df3fdb52 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,8 +25,12 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary', - 'sphinx.ext.todo', 'sphinx.ext.viewcode'] +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.todo', + 'sphinx.ext.viewcode', +] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] From 4e4e620a3e49163cfdb339a25f66945006fcde69 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 26 Aug 2014 14:25:04 -0400 Subject: [PATCH 3/7] Automate testing supported Python versions, coverage, Sphinx docs w/ tox. --- tox.ini | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000000..227e1f1425d7 --- /dev/null +++ b/tox.ini @@ -0,0 +1,28 @@ +[tox] +envlist = +# py26,py27,py32,py33,cover,docs + py26,py27,cover,docs + +[testenv] +commands = + nosetests +deps = + nose + +[testenv:cover] +basepython = + python2.7 +commands = + nosetests --with-xunit --with-xcoverage +deps = + coverage + nosexcover + +[testenv:docs] +basepython = + python2.7 +commands = + sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html +# sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest +deps = + Sphinx From e6f71758435822c746b4a3c3a8c821b03cda8ed3 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 26 Aug 2014 16:51:45 -0400 Subject: [PATCH 4/7] Get all testenvs running under tox. --- .gitignore | 1 + tox.ini | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index c84f08c368f6..87dc79e191e2 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ docs/_build # Virtual environment env/ +coverage.xml diff --git a/tox.ini b/tox.ini index 227e1f1425d7..68d5fbd5833a 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ commands = nosetests deps = nose + unittest2 [testenv:cover] basepython = @@ -15,6 +16,8 @@ basepython = commands = nosetests --with-xunit --with-xcoverage deps = + nose + unittest2 coverage nosexcover From 9d7fc36aae054f54f4e71df45353a89f38f9fd45 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 26 Aug 2014 18:30:39 -0400 Subject: [PATCH 5/7] Drop use of setup.cfg. Pass coverage-related args to nose explicitly. --- setup.cfg | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2eb73f812443..000000000000 --- a/setup.cfg +++ /dev/null @@ -1,6 +0,0 @@ -[nosetests] -match=^test -where=gcloud -nocapture=1 -cover-package=gcloud -cover-erase=1 From 3d9e1bc27b62d4f4b39c93fe3ee6e82807e1c1bb Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 26 Aug 2014 20:10:41 -0400 Subject: [PATCH 6/7] (Really) pass coverage-related args to nose explicitly. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 68d5fbd5833a..41fcc60a9ac0 100644 --- a/tox.ini +++ b/tox.ini @@ -14,7 +14,7 @@ deps = basepython = python2.7 commands = - nosetests --with-xunit --with-xcoverage + nosetests --with-xunit --with-xcoverage --cover-package=gcloud --nocapture --cover-erase deps = nose unittest2 From eb8e37015770615690bba587673d977e206077a1 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 26 Aug 2014 20:11:02 -0400 Subject: [PATCH 7/7] Convert commented line to a TODO. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 41fcc60a9ac0..87f793420597 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = -# py26,py27,py32,py33,cover,docs py26,py27,cover,docs +# TODO: add py32,py33,py34 [testenv] commands =