diff --git a/IPython/nbconvert/tests/test_nbconvertapp.py b/IPython/nbconvert/tests/test_nbconvertapp.py index 855cb4f..bee17cf 100644 --- a/IPython/nbconvert/tests/test_nbconvertapp.py +++ b/IPython/nbconvert/tests/test_nbconvertapp.py @@ -46,7 +46,7 @@ class TestNbConvertApp(TestsBase): Do search patterns work for notebook names? """ with self.create_temp_cwd(['notebook*.ipynb']): - self.call('nbconvert --to="python" --notebooks=*.ipynb') + self.call('nbconvert --to="python" --notebooks=\'["*.ipynb"]\'') assert os.path.isfile('notebook1.py') assert os.path.isfile('notebook2.py') @@ -57,8 +57,8 @@ class TestNbConvertApp(TestsBase): """ with self.create_temp_cwd(): self.copy_files_to(['notebook*.ipynb'], 'subdir/') - self.call('nbconvert --to="python"' - ' --notebooks=%s' % os.path.join('subdir', '*.ipynb')) + self.call('nbconvert --to="python" --notebooks=' + '\'["%s"]\'' % os.path.join('subdir', '*.ipynb')) assert os.path.isfile('notebook1.py') assert os.path.isfile('notebook2.py') @@ -68,7 +68,8 @@ class TestNbConvertApp(TestsBase): Do explicit notebook names work? """ with self.create_temp_cwd(['notebook*.ipynb']): - self.call('nbconvert --to="python" --notebooks=notebook2.ipynb') + self.call('nbconvert --to="python" --notebooks=' + '\'["notebook2.ipynb"]\'') assert not os.path.isfile('notebook1.py') assert os.path.isfile('notebook2.py') @@ -93,8 +94,8 @@ class TestNbConvertApp(TestsBase): Do export templates work? """ with self.create_temp_cwd(['notebook2.ipynb']): - self.call('nbconvert --to=slides --notebooks=notebook2.ipynb' - ' --template=reveal') + self.call('nbconvert --to=slides --notebooks=' + '\'["notebook2.ipynb"]\' --template=reveal') assert os.path.isfile('notebook2.slides.html') with open('notebook2.slides.html') as f: assert '/reveal.css' in f.read() @@ -106,7 +107,7 @@ class TestNbConvertApp(TestsBase): """ with self.create_temp_cwd(['notebook*.ipynb']): self.call('nbconvert --to="python" --notebooks=' - '*.ipynb,notebook1.ipynb,notebook2.ipynb') + '\'["*.ipynb","notebook1.ipynb","notebook2.ipynb"]\'') assert os.path.isfile('notebook1.py') assert os.path.isfile('notebook2.py') @@ -117,7 +118,7 @@ class TestNbConvertApp(TestsBase): """ with self.create_temp_cwd(['notebook*.ipynb']): self.call('nbconvert --to="python" --notebooks=' - 'notebook1.ipynb,notebook2.ipynb,*.ipynb') + '\'["notebook1.ipynb","notebook2.ipynb","*.ipynb"]\'') assert os.path.isfile('notebook1.py') assert os.path.isfile('notebook2.py') diff --git a/IPython/utils/traitlets.py b/IPython/utils/traitlets.py index 4557dda..6c85e04 100644 --- a/IPython/utils/traitlets.py +++ b/IPython/utils/traitlets.py @@ -1208,11 +1208,6 @@ class Container(Instance): raise TraitError(e) def validate(self, obj, value): - # Command line arguments come in as strings, let's make them into - # lists so we can proceed with validation - if isinstance(value, basestring): - value = value.split(',') - value = super(Container, self).validate(obj, value) if value is None: return value