Beispiel #1
0
    def test_convert_admonitions_asciidoc_dita(self):
        converter = Converter("asciidoc", "dita")
        converted_file = converter.convert(self.get_sample("Admonitions.adoc"),
                                           self.generate_output_filename())
        assert_xml(converted_file)
        with open(converted_file, 'r') as converted_fd:
            converted_content = converted_fd.read()

        assert 'A NOTE admonition block' in converted_content
        assert 'A CAUTION admonition block' in converted_content
        assert 'A TIP admonition block' in converted_content
        assert 'A WARNING admonition block' in converted_content
        assert 'An IMPORTANT admonition block' in converted_content
Beispiel #2
0
    def test_convert_admonitions_asciidoc_dita(self):
        converter = Converter("asciidoc", "dita")
        converted_file = converter.convert(self.get_sample("Admonitions.adoc"),
                                           self.generate_output_filename())
        assert_xml(converted_file)
        with open(converted_file, 'r') as converted_fd:
            converted_content = converted_fd.read()

        assert 'A NOTE admonition block' in converted_content
        assert 'A CAUTION admonition block' in converted_content
        assert 'A TIP admonition block' in converted_content
        assert 'A WARNING admonition block' in converted_content
        assert 'An IMPORTANT admonition block' in converted_content
Beispiel #3
0
 def test_docbooktodita_docbook_dita(self):
     converter = DocBookToDita()
     converted_file = converter.convert(self.get_sample("docbook.xml"),
                                        "docbook", "dita",
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #4
0
 def test_asciidoctor_asciidoc_docbook(self):
     converter = AsciiDoctor()
     converted_file = converter.convert(self.get_sample("asciidoc.txt"),
                                        "asciidoc", "docbook",
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #5
0
 def test_docbooktodita_docbook_dita(self):
     converter = DocBookToDita()
     converted_file = converter.convert(self.get_sample("docbook.xml"),
                                        "docbook", "dita",
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #6
0
 def test_asciidoctor_asciidoc_docbook(self):
     converter = AsciiDoctor()
     converted_file = converter.convert(self.get_sample("asciidoc.txt"),
                                        "asciidoc", "docbook",
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #7
0
 def test_convert_asciidoc_dita(self):
     converter = Converter("asciidoc", "dita")
     converted_file = converter.convert(self.get_sample("asciidoc.txt"),
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #8
0
 def test_convert_docbook_dita(self):
     converter = Converter("docbook", "dita")
     converted_file = converter.convert(self.get_sample("docbook.xml"),
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #9
0
 def test_convert_asciidoc_docbook__asciidoc_not_present(self):
     converter = Converter("asciidoc", "docbook")
     converted_file = converter.convert(self.get_sample("asciidoc.txt"),
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #10
0
 def test_convert_asciidoc_dita(self):
     converter = Converter("asciidoc", "dita")
     converted_file = converter.convert(self.get_sample("asciidoc.txt"),
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #11
0
 def test_convert_docbook_dita(self):
     converter = Converter("docbook", "dita")
     converted_file = converter.convert(self.get_sample("docbook.xml"),
                                        self.generate_output_filename())
     assert_xml(converted_file)
Beispiel #12
0
 def test_convert_asciidoc_docbook__asciidoc_not_present(self):
     converter = Converter("asciidoc", "docbook")
     converted_file = converter.convert(self.get_sample("asciidoc.txt"),
                                        self.generate_output_filename())
     assert_xml(converted_file)