Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)