예제 #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
예제 #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
예제 #3
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)
예제 #4
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)
예제 #5
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)
예제 #6
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)
예제 #7
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)
예제 #8
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)