Skip to content
Permalink
Browse files
Clean up some doctest hacks
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Mar 31, 2017
1 parent 1ff860a commit 0917282111b823c0870da16cfd515a22ec4cb7fb
Showing with 12 additions and 12 deletions.
  1. +12 −12 nikola/utils.py
@@ -953,26 +953,26 @@ def get_crumbs(path, is_file=False, index_folder=None, lang=None):
>>> crumbs = get_crumbs('galleries')
>>> len(crumbs)
1
>>> print('|'.join(crumbs[0]))
#|galleries
>>> crumbs[0]
['#', 'galleries']
>>> crumbs = get_crumbs(os.path.join('galleries','demo'))
>>> len(crumbs)
2
>>> print('|'.join(crumbs[0]))
..|galleries
>>> print('|'.join(crumbs[1]))
#|demo
>>> crumbs[0]
['..', 'galleries']
>>> crumbs[1]
['#', 'demo']
>>> crumbs = get_crumbs(os.path.join('listings','foo','bar'), is_file=True)
>>> len(crumbs)
3
>>> print('|'.join(crumbs[0]))
..|listings
>>> print('|'.join(crumbs[1]))
.|foo
>>> print('|'.join(crumbs[2]))
#|bar
>>> crumbs[0]
['..', 'listings']
>>> crumbs[1]
['.', 'foo']
>>> crumbs[2]
['#', 'bar']
"""
crumbs = path.split(os.sep)
_crumbs = []

0 comments on commit 0917282

Please sign in to comment.