Show More
@@ -187,4 +187,7 b' def test_SList():' | |||||
187 | nt.assert_equal(sl.s, 'a 11 b 1 a 2') |
|
187 | nt.assert_equal(sl.s, 'a 11 b 1 a 2') | |
188 | nt.assert_equal(sl.grep(lambda x: x.startswith('a')), text.SList(['a 11', 'a 2'])) |
|
188 | nt.assert_equal(sl.grep(lambda x: x.startswith('a')), text.SList(['a 11', 'a 2'])) | |
189 | nt.assert_equal(sl.fields(0), text.SList(['a', 'b', 'a'])) |
|
189 | nt.assert_equal(sl.fields(0), text.SList(['a', 'b', 'a'])) | |
190 | nt.assert_equal(sl.sort(field=1, nums=True), text.SList(['b 1', 'a 2', 'a 11'])) No newline at end of file |
|
190 | nt.assert_equal(sl.sort(field=1, nums=True), text.SList(['b 1', 'a 2', 'a 11'])) | |
|
191 | ||||
|
192 | def test_non_local_path_import(): | |||
|
193 | nt.assert_in("path", sys.modules) |
@@ -7,6 +7,7 b' Inheritance diagram:' | |||||
7 | .. inheritance-diagram:: IPython.utils.text |
|
7 | .. inheritance-diagram:: IPython.utils.text | |
8 | :parts: 3 |
|
8 | :parts: 3 | |
9 | """ |
|
9 | """ | |
|
10 | from __future__ import absolute_import | |||
10 |
|
11 | |||
11 | import os |
|
12 | import os | |
12 | import re |
|
13 | import re | |
@@ -761,4 +762,4 b' def get_text_list(list_, last_sep=\' and \', sep=", ", wrap_item_with=""):' | |||||
761 | return list_[0] |
|
762 | return list_[0] | |
762 | return '%s%s%s' % ( |
|
763 | return '%s%s%s' % ( | |
763 | sep.join(i for i in list_[:-1]), |
|
764 | sep.join(i for i in list_[:-1]), | |
764 | last_sep, list_[-1]) No newline at end of file |
|
765 | last_sep, list_[-1]) |
General Comments 0
You need to be logged in to leave comments.
Login now