Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# After changing this file, check it on:
# http://lint.travis-ci.org/
language: python
sudo: false
python:
- 3.3
- 2.7
cache:
directories:
- $HOME/.cache/pip
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
- pip install --find-links http://wheels.astropy.org/ --find-links http://wheels2.astropy.org/ --trusted-host wheels.astropy.org --trusted-host wheels2.astropy.org --use-wheel nose numpy matplotlib Sphinx
script:
- python setup.py test
2 changes: 1 addition & 1 deletion numpydoc/docscrape_sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def _str_member_list(self, name):
maxlen_0 = max(3, max([len(x[0]) for x in others]))
hdr = sixu("=")*maxlen_0 + sixu(" ") + sixu("=")*10
fmt = sixu('%%%ds %%s ') % (maxlen_0,)
out += ['', hdr]
out += ['', '', hdr]
for param, param_type, desc in others:
desc = sixu(" ").join(x.strip() for x in desc).strip()
if param_type:
Expand Down
17 changes: 16 additions & 1 deletion numpydoc/tests/test_docscrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,8 @@ def test_duplicate_signature():
Current time.
y : ndarray
Current variable values.
x : float
Some parameter

Methods
-------
Expand Down Expand Up @@ -712,6 +714,8 @@ def test_class_members_doc():
Current time.
y : ndarray
Current variable values.
x : float
Some parameter

Methods
-------
Expand All @@ -726,7 +730,13 @@ def test_class_members_doc():
""")

def test_class_members_doc_sphinx():
doc = SphinxClassDoc(None, class_doc_txt)
class Foo:
@property
def x(self):
"""Test attribute"""
return None

doc = SphinxClassDoc(Foo, class_doc_txt)
non_blank_line_by_line_compare(str(doc),
"""
Foo
Expand All @@ -747,6 +757,11 @@ def test_class_members_doc_sphinx():

.. rubric:: Attributes

.. autosummary::
:toctree:

x

=== ==========
t (float) Current time.
y (ndarray) Current variable values.
Expand Down