Skip to content
Permalink
Browse files

fix unit test broken after the addition of many delayed import

  • Loading branch information...
sdpython committed Mar 12, 2019
1 parent 35bf2c2 commit d42f7abff28a282509e223e930dc0e076f92081f
Showing with 11 additions and 2 deletions.
  1. +9 −1 _unittests/ut_filehelper/test_file_tree_node.py
  2. +2 −1 src/pyquickhelper/helpgen/utils_sphinx_doc.py
@@ -62,6 +62,8 @@ def filter(root, path, f, d):
nb += 1
if nb > 15:
break
if "cli_helper.py" in f.name:
continue

if "__init__" not in f.name and ".py" in f.name and ".pyc" not in f.name \
and "__main__" not in f.name:
@@ -77,9 +79,15 @@ def filter(root, path, f, d):
condition = "# replace # from ." in cont2
if not condition:
for line in lines:
if "from ..helpgen import docstring2html" in line:
continue
if "from .pandashelper import df2rst" in line:
continue
if "from ." in line and "import" in line:
doc = "\n-------------DOC--------\n" + doc
raise Exception(
"{0}\nLINE:\n{1}\nCONT:\n{2}".format(f.fullname, line, cont2))
"{0}\nLINE:\n{1}\n-------CONT---------:\n{2}{3}".format(
f.fullname, line, cont2, doc))

self.assertGreater(nb, 0)
self.assertGreater(nrst, 0)
@@ -871,7 +871,8 @@ def produces_indexes(store_obj, indexes, fexclude_index, titles=None,

def filecontent_to_rst(filename, content):
"""
Produces a *.rst* file which contains the file. It adds a title and a label based on the
Produces a *.rst* file which contains the file.
It adds a title and a label based on the
filename (no folder included).
@param filename filename

0 comments on commit d42f7ab

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