##// END OF EJS Templates
PEP8
David Warde-Farley -
Show More
1 NO CONTENT: modified file
NO CONTENT: modified file
1 NO CONTENT: modified file
NO CONTENT: modified file
@@ -1,7 +1,9 b''
1 import os
1 import os
2 import io
2 import io
3 import nose.tools as nt
3 import nose.tools as nt
4 from nbconvert import *
4 from nbconvert import (
5 ConverterLaTeX, ConverterMarkdown, ConverterPy, ConverterHTML
6 )
5 from nose.tools import nottest
7 from nose.tools import nottest
6
8
7
9
@@ -29,18 +31,18 b' def test_evens():'
29 for conv,ext in converters:
31 for conv, ext in converters:
30 yield test_conversion, conv,root+'.ipynb',root+'.'+ext
32 yield test_conversion, conv, root + '.ipynb', root + '.' + ext
31
33
34
32 @nottest
35 @nottest
33 def compfiles(stra, strb):
36 def compfiles(stra, strb):
34 nt.assert_equal(map(unicode.strip,stra.split('\n')),map(unicode.strip,strb.split('\n')))
37 nt.assert_equal(map(unicode.strip, stra.split('\n')),
38 map(unicode.strip, strb.split('\n')))
39
35
40
36 @nottest
41 @nottest
37 def test_conversion(ConverterClass, ipynb, ref_file):
42 def test_conversion(ConverterClass, ipynb, ref_file):
38
39 converter = ConverterClass(ipynb)
43 converter = ConverterClass(ipynb)
40 converter.read()
44 converter.read()
41 cv =converter.convert()
45 cv = converter.convert()
42 with io.open(ref_file) as ref:
46 with io.open(ref_file) as ref:
43 value = ref.read()
47 value = ref.read()
44 compfiles(cv,value)
48 compfiles(cv, value)
45
46
@@ -53,7 +53,8 b' def test_render_heading():'
53 # Render to rst
53 # Render to rst
54 c = ConverterRST('')
54 c = ConverterRST('')
55 rst_list = c.render_heading(cell_nb)
55 rst_list = c.render_heading(cell_nb)
56 nt.assert_true(isinstance(rst_list, list)) # render should return a list
56 # render should return a list
57 nt.assert_true(isinstance(rst_list, list))
57 rst_str = "".join(rst_list)
58 rst_str = "".join(rst_list)
58 # Confirm rst content
59 # Confirm rst content
59 chk_str = "Test for heading type H{0}\n{1}\n".format(
60 chk_str = "Test for heading type H{0}\n{1}\n".format(
General Comments 0
You need to be logged in to leave comments. Login now