Ejemplo n.º 1
0
    def test_basic_conversion_from_file_url(self):
        with closed_tempfile('.md', text='# some title\n') as file_name:
            expected = u'some title{0}=========={0}{0}'.format(os.linesep)
            # this keeps the : (which should be '|' on windows but pandoc
            # doesn't like it
            file_url = path2url(file_name)
            assert pypandoc._identify_path(file_url)

            received = pypandoc.convert_file(file_url, 'rst')
            self.assertEqualExceptForNewlineEnd(expected, received)
Ejemplo n.º 2
0
    def test_basic_conversion_from_file_url(self):
        # this currently doesn't work: https://github.com/jgm/pandoc/issues/3196
        return
        with closed_tempfile('.md', text='#some title\n') as file_name:
            expected = u'some title{0}=========={0}{0}'.format(os.linesep)
            # this keeps the : (which should be '|' on windows but pandoc
            # doesn't like it
            file_url = path2url(file_name)
            assert pypandoc._identify_path(file_url)

            received = pypandoc.convert(file_url, 'rst')
            self.assertEqualExceptForNewlineEnd(expected, received)