##// END OF EJS Templates
update ref pyfile
update ref pyfile

File last commit:

r8719:d65920be
r8758:ac372756
Show More
test_rst2ipynb.py
21 lines | 801 B | text/x-python | PythonLexer
/ tests / test_rst2ipynb.py
slojo404
adding a basic test and moving tutorial.rst test file to tests directory
r6288 import errno
slojo404
clean up
r6289 import os.path
slojo404
adding a basic test and moving tutorial.rst test file to tests directory
r6288 import subprocess
import nose.tools as nt
David Warde-Farley
Make tests more filesystem-friendly
r8719 test_rst_fname = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'tutorial.rst.ref')
ref_ipynb_fname = os.path.join(os.path.dirname(os.path.abspath(__file__)),
'tutorial.ipynb.ref')
slojo404
adding a basic test and moving tutorial.rst test file to tests directory
r6288
def test_command_line():
with open(ref_ipynb_fname, 'rb') as f:
ref_output = f.read()
David Warde-Farley
Make tests more filesystem-friendly
r8719 tests_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(tests_dir)
rst2ipynb_script = os.path.join(root_dir, 'rst2ipynb.py')
proc = subprocess.Popen([rst2ipynb_script, test_rst_fname],
slojo404
switching to Popen to be python 2.6 friendly
r6291 stdout=subprocess.PIPE)
output = proc.communicate()[0]
Matthias BUSSONNIER
fix some tests
r8622 nt.assert_equal(ref_output.strip('\n'), output.strip('\n'))