@@ -164,11 +164,12 @@ def get_reversed_path_segments(path):
164164 Return reversed segments list given a POSIX ``path`` string. We reverse
165165 based on path segments separated by a "/".
166166
167- Note that the inputh ``path`` is assumed to be normalized, not relative and
167+ Note that the input ``path`` is assumed to be normalized, not relative and
168168 not containing double slash.
169169
170- For example::
171- >>> assert get_reversed_path_segments("a/b/c.js") == ["c.js", "b", "a"]
170+ For example:
171+ >>> get_reversed_path_segments("a/b/c.js")
172+ ['c.js', 'b', 'a']
172173 """
173174 # [::-1] does the list reversing
174175 reversed_segments = path .strip ("/" ).split ("/" )[::- 1 ]
@@ -177,13 +178,14 @@ def get_reversed_path_segments(path):
177178
178179def convert_segments_to_path (segments ):
179180 """
180- Return a path string is suitable for indexing or matching given a
181+ Return a path string suitable for indexing or matching given a
181182 ``segments`` sequence of path segment strings.
182183 The resulting reversed path is prefixed and suffixed by a "/" irrespective
183184 of whether the original path is a file or directory and had such prefix or
184185 suffix.
185186
186- For example::
187- >>> assert convert_segments_to_path(["c.js", "b", "a"]) == "/c.js/b/a/"
187+ For example:
188+ >>> convert_segments_to_path(["c.js", "b", "a"])
189+ '/c.js/b/a/'
188190 """
189191 return "/" + "/" .join (segments ) + "/"
0 commit comments