diff --git a/IPython/nbconvert/tests/test_nbconvertapp.py b/IPython/nbconvert/tests/test_nbconvertapp.py index b9cbec3..b519c11 100644 --- a/IPython/nbconvert/tests/test_nbconvertapp.py +++ b/IPython/nbconvert/tests/test_nbconvertapp.py @@ -210,3 +210,25 @@ class TestNbConvertApp(TestsBase): self.create_empty_notebook(u'empty.ipynb') self.call('nbconvert empty --to html --NbConvertApp.writer_class=\'hello.HelloWriter\'') assert os.path.isfile(u'hello.txt') + + def test_output_suffix(self): + """ + Verify that the output suffix is applied + """ + with self.create_temp_cwd(): + self.create_empty_notebook('empty.ipynb') + self.call('nbconvert empty.ipynb --to notebook') + assert os.path.isfile('empty.nbconvert.ipynb') + + def test_no_output_suffix(self): + """ + Verify that the output suffix is not applied + """ + with self.create_temp_cwd(): + self.create_empty_notebook('empty.ipynb') + os.mkdir('output') + self.call( + 'nbconvert empty.ipynb --to notebook ' + '--FilesWriter.build_directory=output ' + '--no-output-suffix') + assert os.path.isfile('output/empty.ipynb')