From d5533d5a4cbf85134417ed6d75351696c2f9b7ae 2013-07-23 06:29:04 From: Jonathan Frederic Date: 2013-07-23 06:29:04 Subject: [PATCH] Renamed remaining `figures` strings --- diff --git a/IPython/nbconvert/exporters/tests/test_exporter.py b/IPython/nbconvert/exporters/tests/test_exporter.py index 60bd872..64855f8 100644 --- a/IPython/nbconvert/exporters/tests/test_exporter.py +++ b/IPython/nbconvert/exporters/tests/test_exporter.py @@ -45,16 +45,16 @@ class TestExporter(ExportersTestsBase): assert len(output) > 0 - def test_extract_figures(self): + def test_extract_outputs(self): """ - If the ExtractOutputTransformer is enabled, are figures extracted? + If the ExtractOutputTransformer is enabled, are outputs extracted? """ config = Config({'ExtractOutputTransformer': {'enabled': True}}) exporter = self._make_exporter(config=config) (output, resources) = exporter.from_filename(self._get_notebook()) assert resources is not None - assert 'figures' in resources - assert len(resources['figures']) > 0 + assert 'outputs' in resources + assert len(resources['outputs']) > 0 def test_transformer_class(self): diff --git a/IPython/nbconvert/transformers/convertfigures.py b/IPython/nbconvert/transformers/convertfigures.py index 786873c..25c084a 100644 --- a/IPython/nbconvert/transformers/convertfigures.py +++ b/IPython/nbconvert/transformers/convertfigures.py @@ -46,10 +46,10 @@ class ConvertFiguresTransformer(Transformer): See base.py """ - #Loop through all of the datatypes of the outputs in the cell. + # Loop through all of the datatypes of the outputs in the cell. for index, cell_out in enumerate(cell.get('outputs', [])): for data_type, data in cell_out.items(): - # this must run *before* extract figures, + # this must run *before* extract outputs, # so figure_name and filename do not exist self._convert_figure(cell_out, resources, data_type, data) return cell, resources