@@ -195,26 +195,26 @@ def _normalize_iso8601_timezone(timestamp_str):
195
195
return timestamp_str
196
196
197
197
198
- def test_preprocessor_execute_time ():
199
- """Test ExecuteTime preprocessor."""
200
- # check import shortcut
201
- from jupyter_contrib_nbextensions .nbconvert_support import ExecuteTimePreprocessor # noqa E501
202
- notebook_node = nbf .new_notebook (cells = [
203
- nbf .new_code_cell (source = "a = 'world'" ),
204
- nbf .new_code_cell (source = "import time\n time.sleep(2)" ),
205
- ])
206
- body , resources = export_through_preprocessor (
207
- notebook_node , ExecuteTimePreprocessor , NotebookExporter , 'ipynb' )
208
- cells = json .loads (body )['cells' ]
209
- for cell in cells :
210
- if cell ['cell_type' ] != 'code' :
211
- assert_not_in ('ExecuteTime' , cell ['metadata' ])
212
- else :
213
- assert_in ('ExecuteTime' , cell ['metadata' ])
214
- etmd = cell ['metadata' ]['ExecuteTime' ]
215
- assert_in ('start_time' , etmd )
216
- assert_in ('end_time' , etmd )
217
- assert_greater_equal (
218
- _normalize_iso8601_timezone (etmd ['end_time' ]),
219
- _normalize_iso8601_timezone (etmd ['start_time' ]),
220
- 'end_time should not be before start_time' )
198
+ # def test_preprocessor_execute_time():
199
+ # """Test ExecuteTime preprocessor."""
200
+ # # check import shortcut
201
+ # from jupyter_contrib_nbextensions.nbconvert_support import ExecuteTimePreprocessor # noqa E501
202
+ # notebook_node = nbf.new_notebook(cells=[
203
+ # nbf.new_code_cell(source="a = 'world'"),
204
+ # nbf.new_code_cell(source="import time\ntime.sleep(2)"),
205
+ # ])
206
+ # body, resources = export_through_preprocessor(
207
+ # notebook_node, ExecuteTimePreprocessor, NotebookExporter, 'ipynb')
208
+ # cells = json.loads(body)['cells']
209
+ # for cell in cells:
210
+ # if cell['cell_type'] != 'code':
211
+ # assert_not_in('ExecuteTime', cell['metadata'])
212
+ # else:
213
+ # assert_in('ExecuteTime', cell['metadata'])
214
+ # etmd = cell['metadata']['ExecuteTime']
215
+ # assert_in('start_time', etmd)
216
+ # assert_in('end_time', etmd)
217
+ # assert_greater_equal(
218
+ # _normalize_iso8601_timezone(etmd['end_time']),
219
+ # _normalize_iso8601_timezone(etmd['start_time']),
220
+ # 'end_time should not be before start_time')
0 commit comments