Skip to content
Open
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
2 changes: 1 addition & 1 deletion _unittests/ut__main/test_documentation_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_test(self, fold: str, name: str, verbose=0) -> int:
cmds = [sys.executable, "-u", os.path.join(fold, name)]
p = subprocess.Popen(cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
res = p.communicate()
out, err = res
_out, err = res
st = err.decode("ascii", errors="ignore")
if len(st) > 0 and "Traceback" in st:
if '"dot" not found in path.' in st:
Expand Down
16 changes: 4 additions & 12 deletions _unittests/ut_blocdefs/test_blocref_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def test_blocref_rst(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(
Expand Down Expand Up @@ -61,9 +59,7 @@ def test_blocref_html(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(
Expand Down Expand Up @@ -102,9 +98,7 @@ def test_blocref2(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(
Expand Down Expand Up @@ -147,9 +141,7 @@ def test_blocreflist(self):
:contents: 1

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="html")
Expand Down
12 changes: 3 additions & 9 deletions _unittests/ut_blocdefs/test_exref_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def test_exref(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(
Expand Down Expand Up @@ -64,9 +62,7 @@ def test_exreflist(self):
:sort: title

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="rst")
Expand Down Expand Up @@ -105,9 +101,7 @@ def test_exreflist_rst(self):
:sort: title

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

rst = rst2html(content, writer_name="rst")
Expand Down
12 changes: 3 additions & 9 deletions _unittests/ut_blocdefs/test_faqref_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def test_faqref(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(
Expand Down Expand Up @@ -64,9 +62,7 @@ def test_faqreflist(self):
:sort: title

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="rst")
Expand Down Expand Up @@ -105,9 +101,7 @@ def test_faqreflist_rst(self):
:sort: title

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

rst = rst2html(content, writer_name="rst")
Expand Down
16 changes: 4 additions & 12 deletions _unittests/ut_blocdefs/test_mathdef_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def test_mathdef(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(
Expand Down Expand Up @@ -62,9 +60,7 @@ def test_mathdeflist(self):
:tag: definition

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="rst")
Expand Down Expand Up @@ -102,9 +98,7 @@ def test_mathdeflist_contents(self):
:contents:

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="rst")
Expand Down Expand Up @@ -148,9 +142,7 @@ def test_mathdeflist_contents_body_sphinx(self):
:contents:

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(
Expand Down
12 changes: 3 additions & 9 deletions _unittests/ut_collapse/test_collapse_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ def test_collapse(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

# RST
Expand Down Expand Up @@ -101,9 +99,7 @@ def test_collapse_legend(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

# RST
Expand Down Expand Up @@ -136,9 +132,7 @@ def test_collapse_show(self):
this code should appear___

after
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

# RST
Expand Down
12 changes: 6 additions & 6 deletions _unittests/ut_docassert/test_docassert.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_import_object(self):
this = os.path.abspath(os.path.dirname(__file__))
data = os.path.join(this, "datadoc")
with sys_path_append(data):
obj, name = import_object("exdocassert.onefunction", "function")
obj, _name = import_object("exdocassert.onefunction", "function")
self.assertTrue(obj is not None)
self.assertTrue(obj(4, 5), 9)

Expand Down Expand Up @@ -45,7 +45,7 @@ def __len__(self):
this = os.path.abspath(os.path.dirname(__file__))
data = os.path.join(this, "datadoc")
with sys_path_append(data):
obj, name = import_object("exdocassert2.onefunction", "function")
_obj, _name = import_object("exdocassert2.onefunction", "function")
newstring = ".. autofunction:: exdocassert2.onefunction"
html, warn = rst2html(newstring, return_warnings=True)
self.assertTrue(html is not None)
Expand Down Expand Up @@ -88,7 +88,7 @@ def __len__(self):
this = os.path.abspath(os.path.dirname(__file__))
data = os.path.join(this, "datadoc")
with sys_path_append(data):
obj, name = import_object("exsig.clex.onemethod", "method")
_obj, _name = import_object("exsig.clex.onemethod", "method")
newstring = ".. automethod:: exsig.clex.onemethod"
html, warn = rst2html(newstring, return_warnings=True)
self.assertTrue(html is not None)
Expand Down Expand Up @@ -133,7 +133,7 @@ def __len__(self):
this = os.path.abspath(os.path.dirname(__file__))
data = os.path.join(this, "datadoc")
with sys_path_append(data):
obj, name = import_object("clsslk.Estimator", "class")
_obj, _name = import_object("clsslk.Estimator", "class")
newstring = ".. autoclass:: clsslk.Estimator"
html, warn = rst2html(newstring, return_warnings=True)
self.assertTrue(html is not None)
Expand Down Expand Up @@ -177,7 +177,7 @@ def __len__(self):
this = os.path.abspath(os.path.dirname(__file__))
data = os.path.join(this, "datadoc")
with sys_path_append(data):
obj, name = import_object("clsslk.Estimator2", "class")
_obj, _name = import_object("clsslk.Estimator2", "class")
newstring = ".. autoclass:: clsslk.Estimator2"
html, warn = rst2html(newstring, return_warnings=True)
self.assertTrue(html is not None)
Expand Down Expand Up @@ -221,7 +221,7 @@ def __len__(self):
this = os.path.abspath(os.path.dirname(__file__))
data = os.path.join(this, "datadoc")
with sys_path_append(data):
obj, name = import_object("clsslk.Estimator3", "class")
_obj, _name = import_object("clsslk.Estimator3", "class")
newstring = ".. autoclass:: clsslk.Estimator3"
html, warn = rst2html(
newstring, return_warnings=True, new_extensions=["numpydoc"]
Expand Down
29 changes: 7 additions & 22 deletions _unittests/ut_epkg/test_epkg_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
depart_epkg_node,
)


tives = [("epkg", epkg_role, epkg_node, visit_epkg_node, depart_epkg_node)]


Expand All @@ -20,9 +19,7 @@ def test_epkg_module(self):
================

abeforea :epkg:`pandas` aaftera
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')
html = rst2html(content, writer_name="rst")

Expand All @@ -47,9 +44,7 @@ def test_epkg_module_twice(self):
================

abeforea :epkg:`pandas` aaftera
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="rst")
Expand All @@ -62,9 +57,7 @@ def test_epkg_sub(self):
================

abeforea :epkg:`pandas:DataFrame.to_html` aaftera
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="html")
Expand All @@ -90,9 +83,7 @@ def test_epkg_function(self):
================

abeforea :epkg:`pandas:DataFrame:to_html` aaftera
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

def pandas_link(input):
Expand Down Expand Up @@ -129,9 +120,7 @@ def test_epkg_class(self):
abeforea :epkg:`pandas:DataFrame:to_html` aaftera

7za :epkg:`Pandoc` 7zb
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

class pandas_link:
Expand All @@ -153,9 +142,7 @@ def test_epkg_function_string(self):
================

abeforea :epkg:`pandas:DataFrame:to_html` aaftera
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="html")
Expand Down Expand Up @@ -188,9 +175,7 @@ def test_epkg_function_long_link(self):

`one link on two lines <http://first.part/
second part>`_.
""".replace(
" ", ""
)
""".replace(" ", "")
content = content.replace('u"', '"')

html = rst2html(content, writer_name="html")
Expand Down
Loading
Loading