Skip to content

Commit

Permalink
Merge pull request #108 from minrk/inplace-notebook
Browse files Browse the repository at this point in the history
nbconvert --inplace implies --to notebook
  • Loading branch information
Carreau committed Sep 21, 2015
2 parents ac88817 + e2e3623 commit 1ba7a86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions nbconvert/nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@ def validate(self, obj, value):
),
'inplace' : (
{
'NbConvertApp' : {'use_output_suffix' : False},
'FilesWriter': {'build_directory': ''}
'NbConvertApp' : {
'use_output_suffix' : False,
'export_format': 'notebook',
},
'FilesWriter': {'build_directory': ''},
},
"""Run nbconvert in place, overwriting the existing notebook (only
relevant when converting to notebook format)"""
Expand Down
3 changes: 2 additions & 1 deletion nbconvert/tests/test_nbconvertapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,10 @@ def test_inplace(self):
"""
with self.create_temp_cwd():
self.create_empty_notebook('empty.ipynb')
self.nbconvert('empty.ipynb --to notebook --inplace')
self.nbconvert('empty.ipynb --inplace')
assert os.path.isfile('empty.ipynb')
assert not os.path.isfile('empty.nbconvert.ipynb')
assert not os.path.isfile('empty.html')

def test_allow_errors(self):
"""
Expand Down

0 comments on commit 1ba7a86

Please sign in to comment.