Skip to content

Commit adcc5da

Browse files
committed
Merge pull request #9 from pv/fixes
MAINT: add travis, fix minor bug, and stub out Py3 porting tests for unported modules
2 parents 223df02 + be19d71 commit adcc5da

File tree

5 files changed

+34
-4
lines changed

5 files changed

+34
-4
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# After changing this file, check it on:
2+
# http://lint.travis-ci.org/
3+
language: python
4+
python:
5+
- 3.3
6+
- 2.7
7+
before_install:
8+
- pip install --upgrade pip setuptools # Upgrade pip and setuptools to get ones with `wheel` support
9+
- pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --use-wheel --use-mirrors nose numpy matplotlib Sphinx
10+
script:
11+
- python setup.py test

numpydoc/docscrape_sphinx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
class SphinxDocString(NumpyDocString):
1515
def __init__(self, docstring, config={}):
16-
# Subclasses seemingly do not call this.
1716
NumpyDocString.__init__(self, docstring, config=config)
17+
self.load_config(config)
1818

1919
def load_config(self, config):
2020
self.use_plots = config.get('use_plots', False)

numpydoc/tests/test_phantom_import.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
from __future__ import division, absolute_import, print_function
22

3-
import numpydoc.phantom_import
3+
import sys
4+
from nose import SkipTest
5+
6+
def test_import():
7+
if sys.version_info[0] >= 3:
8+
raise SkipTest("phantom_import not ported to Py3")
9+
10+
import numpydoc.phantom_import
411

512
# No tests at the moment...

numpydoc/tests/test_plot_directive.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
from __future__ import division, absolute_import, print_function
22

3-
import numpydoc.plot_directive
3+
import sys
4+
from nose import SkipTest
5+
6+
def test_import():
7+
if sys.version_info[0] >= 3:
8+
raise SkipTest("plot_directive not ported to Python 3 (use the one from Matplotlib instead)")
9+
import numpydoc.plot_directive
410

511
# No tests at the moment...

numpydoc/tests/test_traitsdoc.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
from __future__ import division, absolute_import, print_function
22

3-
import numpydoc.traitsdoc
3+
import sys
4+
from nose import SkipTest
5+
6+
def test_import():
7+
if sys.version_info[0] >= 3:
8+
raise SkipTest("traitsdoc not ported to Python3")
9+
import numpydoc.traitsdoc
410

511
# No tests at the moment...

0 commit comments

Comments
 (0)