##// END OF EJS Templates
test that we don't leave any extra CRs in nbconvert
MinRK -
Show More
@@ -103,6 +103,20 b' class TestNbConvertApp(TestsBase):'
103 assert os.path.isfile('notebook1.tex')
103 assert os.path.isfile('notebook1.tex')
104 assert os.path.isfile('notebook1.pdf')
104 assert os.path.isfile('notebook1.pdf')
105
105
106 @dec.onlyif_cmds_exist('pandoc')
107 def test_spurious_cr(self):
108 """Check for extra CR characters"""
109 with self.create_temp_cwd(['notebook2.ipynb']):
110 self.call('nbconvert --log-level 0 --to latex notebook2')
111 assert os.path.isfile('notebook2.tex')
112 with open('notebook2.tex') as f:
113 tex = f.read()
114 self.call('nbconvert --log-level 0 --to html notebook2')
115 assert os.path.isfile('notebook2.html')
116 with open('notebook2.html') as f:
117 html = f.read()
118 self.assertEqual(tex.count('\r'), tex.count('\r\n'))
119 self.assertEqual(html.count('\r'), html.count('\r\n'))
106
120
107 @dec.onlyif_cmds_exist('pandoc')
121 @dec.onlyif_cmds_exist('pandoc')
108 def test_png_base64_html_ok(self):
122 def test_png_base64_html_ok(self):
@@ -114,7 +128,6 b' class TestNbConvertApp(TestsBase):'
114 with open('notebook2.html') as f:
128 with open('notebook2.html') as f:
115 assert "data:image/png;base64,b'" not in f.read()
129 assert "data:image/png;base64,b'" not in f.read()
116
130
117
118 @dec.onlyif_cmds_exist('pandoc')
131 @dec.onlyif_cmds_exist('pandoc')
119 def test_template(self):
132 def test_template(self):
120 """
133 """
General Comments 0
You need to be logged in to leave comments. Login now