##// END OF EJS Templates
Log level 0 for tests
Jonathan Frederic -
Show More
@@ -37,7 +37,7 b' class TestNbConvertApp(TestsBase):'
37 Will help show if no notebooks are specified?
37 Will help show if no notebooks are specified?
38 """
38 """
39 with self.create_temp_cwd():
39 with self.create_temp_cwd():
40 out, err = self.call('nbconvert --NbConvertApp.log_level="WARN"', raise_on_error=False)
40 out, err = self.call('nbconvert --log-level=0', raise_on_error=False)
41 assert "see '--help-all'" in out
41 assert "see '--help-all'" in out
42
42
43
43
@@ -46,7 +46,7 b' class TestNbConvertApp(TestsBase):'
46 Do search patterns work for notebook names?
46 Do search patterns work for notebook names?
47 """
47 """
48 with self.create_temp_cwd(['notebook*.ipynb']):
48 with self.create_temp_cwd(['notebook*.ipynb']):
49 self.call('nbconvert --to="python" --notebooks=\'["*.ipynb"]\' --NbConvertApp.log_level="WARN"')
49 self.call('nbconvert --to="python" --notebooks=\'["*.ipynb"]\' --log-level=0')
50 assert os.path.isfile('notebook1.py')
50 assert os.path.isfile('notebook1.py')
51 assert os.path.isfile('notebook2.py')
51 assert os.path.isfile('notebook2.py')
52
52
@@ -57,7 +57,7 b' class TestNbConvertApp(TestsBase):'
57 """
57 """
58 with self.create_temp_cwd():
58 with self.create_temp_cwd():
59 self.copy_files_to(['notebook*.ipynb'], 'subdir/')
59 self.copy_files_to(['notebook*.ipynb'], 'subdir/')
60 self.call('nbconvert --to="python" --NbConvertApp.log_level="WARN" --notebooks='
60 self.call('nbconvert --to="python" --log-level=0 --notebooks='
61 '\'["%s"]\'' % os.path.join('subdir', '*.ipynb'))
61 '\'["%s"]\'' % os.path.join('subdir', '*.ipynb'))
62 assert os.path.isfile('notebook1.py')
62 assert os.path.isfile('notebook1.py')
63 assert os.path.isfile('notebook2.py')
63 assert os.path.isfile('notebook2.py')
@@ -68,7 +68,7 b' class TestNbConvertApp(TestsBase):'
68 Do explicit notebook names work?
68 Do explicit notebook names work?
69 """
69 """
70 with self.create_temp_cwd(['notebook*.ipynb']):
70 with self.create_temp_cwd(['notebook*.ipynb']):
71 self.call('nbconvert --NbConvertApp.log_level="WARN" --to="python" --notebooks='
71 self.call('nbconvert --log-level=0 --to="python" --notebooks='
72 '\'["notebook2.ipynb"]\'')
72 '\'["notebook2.ipynb"]\'')
73 assert not os.path.isfile('notebook1.py')
73 assert not os.path.isfile('notebook1.py')
74 assert os.path.isfile('notebook2.py')
74 assert os.path.isfile('notebook2.py')
@@ -81,7 +81,7 b' class TestNbConvertApp(TestsBase):'
81 Do post processors work?
81 Do post processors work?
82 """
82 """
83 with self.create_temp_cwd(['notebook1.ipynb']):
83 with self.create_temp_cwd(['notebook1.ipynb']):
84 self.call('nbconvert --NbConvertApp.log_level="WARN" --to="latex" notebook1'
84 self.call('nbconvert --log-level=0 --to="latex" notebook1'
85 ' --post="PDF" --PDFPostProcessor.verbose=True')
85 ' --post="PDF" --PDFPostProcessor.verbose=True')
86 assert os.path.isfile('notebook1.tex')
86 assert os.path.isfile('notebook1.tex')
87 assert os.path.isfile('notebook1.pdf')
87 assert os.path.isfile('notebook1.pdf')
@@ -93,7 +93,7 b' class TestNbConvertApp(TestsBase):'
93 Do export templates work?
93 Do export templates work?
94 """
94 """
95 with self.create_temp_cwd(['notebook2.ipynb']):
95 with self.create_temp_cwd(['notebook2.ipynb']):
96 self.call('nbconvert --NbConvertApp.log_level="WARN" --to=slides --notebooks='
96 self.call('nbconvert --log-level=0 --to=slides --notebooks='
97 '\'["notebook2.ipynb"]\' --template=reveal')
97 '\'["notebook2.ipynb"]\' --template=reveal')
98 assert os.path.isfile('notebook2.slides.html')
98 assert os.path.isfile('notebook2.slides.html')
99 with open('notebook2.slides.html') as f:
99 with open('notebook2.slides.html') as f:
@@ -105,7 +105,7 b' class TestNbConvertApp(TestsBase):'
105 Can a search pattern be used along with matching explicit notebook names?
105 Can a search pattern be used along with matching explicit notebook names?
106 """
106 """
107 with self.create_temp_cwd(['notebook*.ipynb']):
107 with self.create_temp_cwd(['notebook*.ipynb']):
108 self.call('nbconvert --NbConvertApp.log_level="WARN" --to="python" --notebooks='
108 self.call('nbconvert --log-level=0 --to="python" --notebooks='
109 '\'["*.ipynb","notebook1.ipynb","notebook2.ipynb"]\'')
109 '\'["*.ipynb","notebook1.ipynb","notebook2.ipynb"]\'')
110 assert os.path.isfile('notebook1.py')
110 assert os.path.isfile('notebook1.py')
111 assert os.path.isfile('notebook2.py')
111 assert os.path.isfile('notebook2.py')
@@ -116,7 +116,7 b' class TestNbConvertApp(TestsBase):'
116 Can explicit notebook names be used and then a matching search pattern?
116 Can explicit notebook names be used and then a matching search pattern?
117 """
117 """
118 with self.create_temp_cwd(['notebook*.ipynb']):
118 with self.create_temp_cwd(['notebook*.ipynb']):
119 self.call('nbconvert --NbConvertApp.log_level="WARN" --to="python" --notebooks='
119 self.call('nbconvert --log-level=0 --to="python" --notebooks='
120 '\'["notebook1.ipynb","notebook2.ipynb","*.ipynb"]\'')
120 '\'["notebook1.ipynb","notebook2.ipynb","*.ipynb"]\'')
121 assert os.path.isfile('notebook1.py')
121 assert os.path.isfile('notebook1.py')
122 assert os.path.isfile('notebook2.py')
122 assert os.path.isfile('notebook2.py')
@@ -127,7 +127,7 b' class TestNbConvertApp(TestsBase):'
127 Does the default config work?
127 Does the default config work?
128 """
128 """
129 with self.create_temp_cwd(['notebook*.ipynb', 'ipython_nbconvert_config.py']):
129 with self.create_temp_cwd(['notebook*.ipynb', 'ipython_nbconvert_config.py']):
130 self.call('nbconvert --NbConvertApp.log_level="WARN"')
130 self.call('nbconvert --log-level=0')
131 assert os.path.isfile('notebook1.py')
131 assert os.path.isfile('notebook1.py')
132 assert not os.path.isfile('notebook2.py')
132 assert not os.path.isfile('notebook2.py')
133
133
@@ -139,6 +139,6 b' class TestNbConvertApp(TestsBase):'
139 with self.create_temp_cwd(['notebook*.ipynb',
139 with self.create_temp_cwd(['notebook*.ipynb',
140 'ipython_nbconvert_config.py',
140 'ipython_nbconvert_config.py',
141 'override.py']):
141 'override.py']):
142 self.call('nbconvert --NbConvertApp.log_level="WARN" --config="override.py"')
142 self.call('nbconvert --log-level=0 --config="override.py"')
143 assert not os.path.isfile('notebook1.py')
143 assert not os.path.isfile('notebook1.py')
144 assert os.path.isfile('notebook2.py')
144 assert os.path.isfile('notebook2.py')
General Comments 0
You need to be logged in to leave comments. Login now