##// END OF EJS Templates
try to fix stupid travis build failing...
try to fix stupid travis build failing because of stupid pandoc version html is not exactly the same with double space when converting MD.

File last commit:

r8622:0ea9ae00
r8722:0697c6d2
Show More
test_rst2ipynb.py
28 lines | 832 B | text/x-python | PythonLexer
import os
import errno
import os.path
import subprocess
import nose.tools as nt
test_rst_fname = os.path.join('tests', 'tutorial.rst.ref')
ref_ipynb_fname = os.path.join('tests', 'tutorial.ipynb.ref')
test_generate_ipynb_fname = os.path.join('tests', 'tutorial.ipynb')
def clean_dir():
"Remove generated ipynb file created during conversion"
try:
os.unlink(test_generate_ipynb_fname)
except OSError, e:
if e.errno != errno.ENOENT:
raise
@nt.with_setup(clean_dir, clean_dir)
def test_command_line():
with open(ref_ipynb_fname, 'rb') as f:
ref_output = f.read()
proc = subprocess.Popen(['./rst2ipynb.py', test_rst_fname],
stdout=subprocess.PIPE)
output = proc.communicate()[0]
nt.assert_equal(ref_output.strip('\n'), output.strip('\n'))