@@ -311,7 +311,7 @@ def test_conversion_with_empty_filter(self):
311
311
def test_conversion_with_python_filter (self ):
312
312
markdown_source = "**Here comes the content.**"
313
313
python_source = '''\
314
- #!/usr/bin/env python
314
+ #!{0}
315
315
316
316
"""
317
317
Pandoc filter to convert all regular text to uppercase.
@@ -328,6 +328,8 @@ def caps(key, value, format, meta):
328
328
toJSONFilter(caps)
329
329
'''
330
330
python_source = textwrap .dedent (python_source )
331
+ python_source .format (sys .executable )
332
+
331
333
with closed_tempfile (".py" , python_source ) as tempfile :
332
334
output = pypandoc .convert_text (
333
335
markdown_source , to = 'html' , format = 'md' , outputfile = None , filters = tempfile
@@ -362,7 +364,7 @@ def test_conversion_with_mixed_filters(self):
362
364
lua = textwrap .dedent (lua )
363
365
364
366
python = """\
365
- #!/usr/bin/env python
367
+ #!{0}
366
368
367
369
from pandocfilters import toJSONFilter, Para, Str
368
370
@@ -375,6 +377,7 @@ def func(key, value, format, meta):
375
377
376
378
"""
377
379
python = textwrap .dedent (python )
380
+ python .format (sys .executable )
378
381
379
382
with closed_tempfile (".lua" , lua .format (1 )) as temp1 , closed_tempfile (".py" , python .format (2 )) as temp2 :
380
383
with closed_tempfile (".lua" , lua .format (3 )) as temp3 , closed_tempfile (".py" , python .format (4 )) as temp4 :
0 commit comments