Skip to content
Permalink
Browse files

fix unit test + update travis

  • Loading branch information...
sdpython committed Sep 19, 2018
1 parent ad32c4f commit a7167a5f3b570144dd8efe06a61a8c64e612d8ff
Showing with 10 additions and 8 deletions.
  1. +3 −4 .travis.yml
  2. +7 −4 _unittests/ut_sphinxext/test_autosignature.py
@@ -1,14 +1,13 @@
dist: xenial
sudo: true
language: python
python:
- 3.6
- 3.7
matrix:
include:
- python: 3.6
- python: 3.6
name: "python3.6 sphinx1.7"
env: sphinxconstraint="<1.8"
- python: 3.7
name: "python3.7 sphinx1.8"
env: sphinxconstraint=
install:
- pip install -r requirements.txt
@@ -251,10 +251,12 @@ def test_autosignature_path_option(self):
" :path: name"]
newstring = "\n".join(newstring)
res = rst2html(newstring, writer="rst", layout="sphinx")
self.assertIn('DataFrame (*self*, *data* = *None*', res)
self.assertNotIn('pandas.DataFrame (*self*, *data* = *None*', res)
self.assertIn(
':py:class:`DataFrame <pandas.core.frame.DataFrame>', res)
self.assertNotIn(
'pandas.core.frame.DataFrame (*self*, *data* = *None*', res)
':py:class:`pandas.DataFrame <pandas.core.frame.DataFrame>', res)
self.assertNotIn(
':py:class:`pandas.core.frame.DataFrame', res)

newstring = [".. autosignature:: pandas.core.frame.DataFrame",
" :path: full"]
@@ -266,7 +268,8 @@ def test_autosignature_path_option(self):
newstring = [".. autosignature:: pandas.core.frame.DataFrame"]
newstring = "\n".join(newstring)
res = rst2html(newstring, writer="rst", layout="sphinx")
self.assertIn('pandas.DataFrame (*self*', res)
self.assertIn(
':py:class:`pandas.DataFrame <pandas.core.frame.DataFrame>` (*self*', res)

def test_autosignature_open(self):
self.assertIsInstance(numpy.ndarray.__init__.__text_signature__, str)

0 comments on commit a7167a5

Please sign in to comment.
You can’t perform that action at this time.