Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
fix unit test impacted by previous changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Sep 19, 2018
1 parent 90d589f commit ad32c4f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 13 deletions.
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
dist: xenial
sudo: true
language: python
python:
- 3.6
- 3.7
matrix:
include:
- name: "3.6"
python: "3.6"
env: sphinxconstraint=<1.8
- name: "3.7"
python: "3.7"
- python: 3.6
env: sphinxconstraint="<1.8"
- python: 3.7
env: sphinxconstraint=
install:
- pip install -r requirements.txt
Expand Down
13 changes: 10 additions & 3 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,24 @@
History
=======

current - 2018-09-16 - 0.00Mb
current - 2018-09-20 - 0.00Mb
=============================

* `195`: implement a doctree outputter (2018-09-19)
* `194`: check why call an extension from the setup is different from adding it to the list of extensions (2018-09-19)

1.8.2790 - 2018-09-17 - 2.02Mb
==============================

* `193`: fix an issue when converting a werzeug object into string (2018-09-17)
* `192`: resolve issues with image and sphinx (2018-09-16)
* `191`: implement latex custom builder for rst2html (2018-09-16)
* `189`: fix import issue with update to Sphinx 1.8.0 (2018-09-13)
* `190`: Take dependency on Sphinx >= 1.8 (2018-09-13)
* `189`: fix import issue with update to Sphinx 1.8.0 (2018-09-13)
* `188`: add supports for images in rst and md writers (2018-09-12)
* `187`: fix bug in doxypy when class definition is followed by a commentary (2018-09-12)
* `185`: add markdown rst converter (2018-09-08)
* `186`: remove <SYSTEM MESSAGE> for role ref when converting a string rst into html or rst (2018-09-08)
* `185`: add markdown rst converter (2018-09-08)
* `184`: add tag :orphan: to additional files (2018-09-08)
* `183`: use svg image for formula in HTML and png in latex (2018-08-27)
* `182`: implementation of a backup plan if downloading require.js fails (2018-08-27)
Expand Down
2 changes: 1 addition & 1 deletion _unittests/ut_sphinxext/test_rst_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def test_rst_reference(self):
raise Exception(text)
t1 = "<p>Renamed</p>"
if t1 not in text:
raise Exception(text)
raise Exception(text)

def test_rst_reference2(self):
from docutils import nodes as skip_
Expand Down
5 changes: 3 additions & 2 deletions src/pyquickhelper/cli/cli_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ def create_cli_parser(f, prog=None, layout="sphinx", skip_parameters=('fLOG',),
Parameters *options*, *cleandoc* were added.
"""
docf = clean_documentation_for_cli(f.__doc__, cleandoc)
doctree = docstring2html(docf, writer="doctree", layout=layout, **options)
doctree = docstring2html(docf, writer="doctree",
layout=layout, ret_doctree=True, **options)

# documentation
docparams = {}
Expand Down Expand Up @@ -230,7 +231,7 @@ def flog(*l):
if parser is None:
parser = create_cli_parser(
f, skip_parameters=skip_parameters, cleandoc=cleandoc, **options)
if args is not None and (args == ['--help'] or args == ['-h']):
if args is not None and (args == ['--help'] or args == ['-h']): # pylint: disable=R1714
fLOG(parser.format_help())
else:
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def depart_only(self, node):

def unknown_visit(self, node):
raise NotImplementedError("[_AdditionalVisitDepart] Unknown node: '{0}' in '{1}'".format(
node.__class__.__name__, self.__class__.__name__))
node.__class__.__name__, self.__class__.__name__))


class HTMLTranslatorWithCustomDirectives(_AdditionalVisitDepart, HTMLTranslator):
Expand Down Expand Up @@ -227,7 +227,7 @@ def visit_pending_xref(self, node):

def unknown_visit(self, node):
raise NotImplementedError("[HTMLTranslatorWithCustomDirectives] Unknown node: '{0}' in '{1}'".format(
node.__class__.__name__, self.__class__.__name__))
node.__class__.__name__, self.__class__.__name__))


class RSTTranslatorWithCustomDirectives(_AdditionalVisitDepart, RstTranslator):
Expand Down

0 comments on commit ad32c4f

Please sign in to comment.