From 279aaa6abae86bb090df1a6fd26fd9d0293de386 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 22 Jan 2014 11:20:30 +0200 Subject: [PATCH 1/3] BUG: fix config loading in SphinxDoc* --- numpydoc/docscrape_sphinx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpydoc/docscrape_sphinx.py b/numpydoc/docscrape_sphinx.py index ba93b2ea..cdc2a37d 100644 --- a/numpydoc/docscrape_sphinx.py +++ b/numpydoc/docscrape_sphinx.py @@ -13,8 +13,8 @@ class SphinxDocString(NumpyDocString): def __init__(self, docstring, config={}): - # Subclasses seemingly do not call this. NumpyDocString.__init__(self, docstring, config=config) + self.load_config(config) def load_config(self, config): self.use_plots = config.get('use_plots', False) From 29a94607335aed4d2c2cefb62eb0be48d067be36 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 22 Jan 2014 11:20:53 +0200 Subject: [PATCH 2/3] MAINT: add Travis CI --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..79e8a584 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,11 @@ +# After changing this file, check it on: +# http://lint.travis-ci.org/ +language: python +python: + - 3.3 + - 2.7 +before_install: + - pip install --upgrade pip setuptools # Upgrade pip and setuptools to get ones with `wheel` support + - pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel --use-mirrors nose numpy matplotlib Sphinx +script: + - python setup.py test From be19d718646faddc8e8e12aa9b3a6a4393125cfb Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Wed, 22 Jan 2014 11:32:08 +0200 Subject: [PATCH 3/3] TST: skip tests on Py3 for modules that have not been ported --- numpydoc/tests/test_phantom_import.py | 9 ++++++++- numpydoc/tests/test_plot_directive.py | 8 +++++++- numpydoc/tests/test_traitsdoc.py | 8 +++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/numpydoc/tests/test_phantom_import.py b/numpydoc/tests/test_phantom_import.py index 173b5662..80fae08f 100644 --- a/numpydoc/tests/test_phantom_import.py +++ b/numpydoc/tests/test_phantom_import.py @@ -1,5 +1,12 @@ from __future__ import division, absolute_import, print_function -import numpydoc.phantom_import +import sys +from nose import SkipTest + +def test_import(): + if sys.version_info[0] >= 3: + raise SkipTest("phantom_import not ported to Py3") + + import numpydoc.phantom_import # No tests at the moment... diff --git a/numpydoc/tests/test_plot_directive.py b/numpydoc/tests/test_plot_directive.py index 0e511fcb..1ea10769 100644 --- a/numpydoc/tests/test_plot_directive.py +++ b/numpydoc/tests/test_plot_directive.py @@ -1,5 +1,11 @@ from __future__ import division, absolute_import, print_function -import numpydoc.plot_directive +import sys +from nose import SkipTest + +def test_import(): + if sys.version_info[0] >= 3: + raise SkipTest("plot_directive not ported to Python 3 (use the one from Matplotlib instead)") + import numpydoc.plot_directive # No tests at the moment... diff --git a/numpydoc/tests/test_traitsdoc.py b/numpydoc/tests/test_traitsdoc.py index d36e5ddb..fe5078c4 100644 --- a/numpydoc/tests/test_traitsdoc.py +++ b/numpydoc/tests/test_traitsdoc.py @@ -1,5 +1,11 @@ from __future__ import division, absolute_import, print_function -import numpydoc.traitsdoc +import sys +from nose import SkipTest + +def test_import(): + if sys.version_info[0] >= 3: + raise SkipTest("traitsdoc not ported to Python3") + import numpydoc.traitsdoc # No tests at the moment...