Skip to content

Commit

Permalink
[WiP] New ToC generator based on querying the docbook XML
Browse files Browse the repository at this point in the history
avoid unittest.py dep+use
  • Loading branch information
shlomif committed Aug 24, 2024
1 parent 2514bc1 commit 0a6e31f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions gen-toc-based-on-docbook5.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# Distributed under terms of the MIT license.

# import re
import unittest

import lxml.etree

Expand Down Expand Up @@ -36,7 +35,6 @@ def _process_sections():
parent = section
while parent is not None:
tag = lxml.etree.QName(parent).localname
print(tag)
if tag == 'section':
count_parent_section_elements += 1
parent = parent.getparent()
Expand All @@ -54,6 +52,4 @@ def _process_sections():


if __name__ == '__main__':
from pycotap import TAPTestRunner
suite = unittest.TestLoader().loadTestsFromTestCase(MyTests)
TAPTestRunner().run(suite)
MyTests().test_initial_docbook()

0 comments on commit 0a6e31f

Please sign in to comment.