Show More
@@ -0,0 +1,7 b'' | |||||
|
1 | from IPython.nbconvert.writers.base import WriterBase | |||
|
2 | ||||
|
3 | class HelloWriter(WriterBase): | |||
|
4 | ||||
|
5 | def write(self, output, resources, notebook_name=None, **kw): | |||
|
6 | with open('hello.txt', 'w') as outfile: | |||
|
7 | outfile.write('hello world') |
@@ -200,3 +200,12 b' class TestNbConvertApp(TestsBase):' | |||||
200 | '--PDFPostProcessor.verbose=True') |
|
200 | '--PDFPostProcessor.verbose=True') | |
201 | assert os.path.isfile(u'nb1_análisis.tex') |
|
201 | assert os.path.isfile(u'nb1_análisis.tex') | |
202 | assert os.path.isfile(u'nb1_análisis.pdf') |
|
202 | assert os.path.isfile(u'nb1_análisis.pdf') | |
|
203 | ||||
|
204 | def test_cwd_plugin(self): | |||
|
205 | """ | |||
|
206 | Verify that an extension in the cwd can be imported. | |||
|
207 | """ | |||
|
208 | with self.create_temp_cwd(['hello.py']): | |||
|
209 | self.create_empty_notebook(u'empty.ipynb') | |||
|
210 | self.call('nbconvert empty --to html --NbConvertApp.writer_class=\'hello.HelloWriter\'') | |||
|
211 | assert os.path.isfile(u'hello.txt') |
General Comments 0
You need to be logged in to leave comments.
Login now