From 172b830d38724417942a5ac405e5bde756cafedf 2015-07-24 20:46:10 From: Marin Gilles Date: 2015-07-24 20:46:10 Subject: [PATCH] Re-added fix without whitespace mess --- diff --git a/IPython/utils/tests/test_text.py b/IPython/utils/tests/test_text.py index b3ba76b..ae12c1a 100644 --- a/IPython/utils/tests/test_text.py +++ b/IPython/utils/tests/test_text.py @@ -187,4 +187,7 @@ def test_SList(): nt.assert_equal(sl.s, 'a 11 b 1 a 2') nt.assert_equal(sl.grep(lambda x: x.startswith('a')), text.SList(['a 11', 'a 2'])) nt.assert_equal(sl.fields(0), text.SList(['a', 'b', 'a'])) - nt.assert_equal(sl.sort(field=1, nums=True), text.SList(['b 1', 'a 2', 'a 11'])) \ No newline at end of file + nt.assert_equal(sl.sort(field=1, nums=True), text.SList(['b 1', 'a 2', 'a 11'])) + +def test_non_local_path_import(): + nt.assert_in("path", sys.modules) diff --git a/IPython/utils/text.py b/IPython/utils/text.py index 1a08162..5935aac 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -7,6 +7,7 @@ Inheritance diagram: .. inheritance-diagram:: IPython.utils.text :parts: 3 """ +from __future__ import absolute_import import os import re @@ -761,4 +762,4 @@ def get_text_list(list_, last_sep=' and ', sep=", ", wrap_item_with=""): return list_[0] return '%s%s%s' % ( sep.join(i for i in list_[:-1]), - last_sep, list_[-1]) \ No newline at end of file + last_sep, list_[-1])