diff --git a/IPython/lib/display.py b/IPython/lib/display.py index 0f5060a..9cef8e8 100644 --- a/IPython/lib/display.py +++ b/IPython/lib/display.py @@ -129,6 +129,7 @@ class FileLinks(FileLink): See the FileLink (baseclass of LocalDirectory) docstring for information on additional parameters. + """ self.included_suffixes = included_suffixes @@ -139,9 +140,9 @@ class FileLinks(FileLink): result_html_suffix) self.notebook_display_formatter = \ - self._get_notebook_display_formatter() + notebook_display_formatter or self._get_notebook_display_formatter() self.terminal_display_formatter = \ - self._get_terminal_display_formatter() + terminal_display_formatter or self._get_terminal_display_formatter() def _get_display_formatter(self, dirname_output_format, diff --git a/IPython/lib/tests/test_display.py b/IPython/lib/tests/test_display.py index a48ac33..3fb7c94 100644 --- a/IPython/lib/tests/test_display.py +++ b/IPython/lib/tests/test_display.py @@ -93,7 +93,7 @@ def test_existing_path_FileLinks_repr(): actual = repr(fl) actual = actual.split('\n') actual.sort() - expected = [td, ' %s' % tf1.name,' %s' % tf2.name] + expected = [td, ' %s' % split(tf1.name)[1],' %s' % split(tf2.name)[1]] expected.sort() # We compare the sorted list of links here as that's more reliable nt.assert_equal(actual,expected)