apidoc: Insert newlines between submodules

Fix a regression introduced in 2.1.0 where submodules didn't have a
newline between them resulting in the following warning:

  Explicit markup ends without a blank line; unexpected unindent.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #6440
This commit is contained in:
Stephen Finucane
2019-06-04 16:19:43 +01:00
parent f0b1cbb734
commit 65122ad1cb
2 changed files with 15 additions and 6 deletions

View File

@@ -467,7 +467,8 @@ def test_package_file(tempdir):
outdir = path(tempdir)
(outdir / 'testpkg').makedirs()
(outdir / 'testpkg' / '__init__.py').write_text('')
(outdir / 'testpkg' / 'example.py').write_text('')
(outdir / 'testpkg' / 'hello.py').write_text('')
(outdir / 'testpkg' / 'world.py').write_text('')
(outdir / 'testpkg' / 'subpkg').makedirs()
(outdir / 'testpkg' / 'subpkg' / '__init__.py').write_text('')
apidoc_main(['-o', tempdir, tempdir / 'testpkg'])
@@ -488,10 +489,18 @@ def test_package_file(tempdir):
"Submodules\n"
"----------\n"
"\n"
"testpkg.example module\n"
"----------------------\n"
"testpkg.hello module\n"
"--------------------\n"
"\n"
".. automodule:: testpkg.example\n"
".. automodule:: testpkg.hello\n"
" :members:\n"
" :undoc-members:\n"
" :show-inheritance:\n"
"\n"
"testpkg.world module\n"
"--------------------\n"
"\n"
".. automodule:: testpkg.world\n"
" :members:\n"
" :undoc-members:\n"
" :show-inheritance:\n"