mirror of https://github.com/tLDP/python-tldp
add testing support for new format Asciidoc
This commit is contained in:
parent
631e8fed83
commit
a488ae53de
4
TODO
4
TODO
|
@ -8,10 +8,6 @@ user-visible needs
|
||||||
|
|
||||||
* add support for .epub3 (or just .epub?)
|
* add support for .epub3 (or just .epub?)
|
||||||
|
|
||||||
* add support for asciidoc; instantiate a new instance of Docbook4XML
|
|
||||||
with a SourceDocument of the generated result of asciidoc --backend
|
|
||||||
docbook
|
|
||||||
|
|
||||||
* consider adding support for metadata extraction from documents
|
* consider adding support for metadata extraction from documents
|
||||||
|
|
||||||
* create TLDP DocBook 5.0 XSL files (if we care)
|
* create TLDP DocBook 5.0 XSL files (if we care)
|
||||||
|
|
|
@ -35,7 +35,7 @@ ex_docbook5xml = Namespace(
|
||||||
|
|
||||||
ex_asciidoc = Namespace(
|
ex_asciidoc = Namespace(
|
||||||
doctype=tldp.doctypes.asciidoc.Asciidoc,
|
doctype=tldp.doctypes.asciidoc.Asciidoc,
|
||||||
filename=opj(sampledocs, 'text-simple.txt'),
|
filename=opj(sampledocs, 'asciidoc-complete.txt'),
|
||||||
)
|
)
|
||||||
#
|
#
|
||||||
# ex_rst = Namespace(
|
# ex_rst = Namespace(
|
||||||
|
@ -43,11 +43,6 @@ ex_asciidoc = Namespace(
|
||||||
# filename=opj(sampledocs, 'restructuredtext-simple.rst'),
|
# filename=opj(sampledocs, 'restructuredtext-simple.rst'),
|
||||||
# )
|
# )
|
||||||
#
|
#
|
||||||
# ex_text = Namespace(
|
|
||||||
# doctype=tldp.doctypes.text.Text,
|
|
||||||
# filename=opj(sampledocs, 'text-simple.txt'),
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
# ex_markdown = Namespace(
|
# ex_markdown = Namespace(
|
||||||
# doctype=tldp.doctypes.markdown.Markdown,
|
# doctype=tldp.doctypes.markdown.Markdown,
|
||||||
# filename=opj(sampledocs, 'markdown-simple.md'),
|
# filename=opj(sampledocs, 'markdown-simple.md'),
|
||||||
|
|
|
@ -306,9 +306,22 @@ class TestDriverProcessSkips(TestInventoryBase):
|
||||||
self.assertEquals(len(inc) + 1, len(inv.all.keys()))
|
self.assertEquals(len(inc) + 1, len(inv.all.keys()))
|
||||||
|
|
||||||
|
|
||||||
@unittest.skip("Except when you want to spend time....")
|
# @unittest.skip("Except when you want to spend time....")
|
||||||
class TestDriverBuild(TestInventoryBase):
|
class TestDriverBuild(TestInventoryBase):
|
||||||
|
|
||||||
|
def test_build_asciidoc(self):
|
||||||
|
self.add_docbook4xml_xsl_to_config()
|
||||||
|
c = self.config
|
||||||
|
c.build = True
|
||||||
|
self.add_new('Frobnitz-Asciidoc-HOWTO', example.ex_asciidoc)
|
||||||
|
inv = tldp.inventory.Inventory(c.pubdir, c.sourcedir)
|
||||||
|
self.assertEquals(1, len(inv.all.keys()))
|
||||||
|
docs = inv.all.values()
|
||||||
|
c.skip = []
|
||||||
|
tldp.driver.publish(c, docs)
|
||||||
|
doc = docs.pop(0)
|
||||||
|
self.assertTrue(doc.output.iscomplete)
|
||||||
|
|
||||||
def test_build_linuxdoc(self):
|
def test_build_linuxdoc(self):
|
||||||
c = self.config
|
c = self.config
|
||||||
c.build = True
|
c.build = True
|
||||||
|
|
|
@ -21,6 +21,7 @@ class Asciidoc(Docbook4XML):
|
||||||
required = {'asciidoc_asciidoc': isexecutable,
|
required = {'asciidoc_asciidoc': isexecutable,
|
||||||
'asciidoc_xmllint': isexecutable,
|
'asciidoc_xmllint': isexecutable,
|
||||||
}
|
}
|
||||||
|
required.update(Docbook4XML.required)
|
||||||
|
|
||||||
def make_docbook45(self):
|
def make_docbook45(self):
|
||||||
s = '''"{config.asciidoc_asciidoc}" \\
|
s = '''"{config.asciidoc_asciidoc}" \\
|
||||||
|
|
Loading…
Reference in New Issue