Skip to content

Commit

Permalink
fuck you doctest
Browse files Browse the repository at this point in the history
Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Oct 2, 2013
1 parent d5ee3df commit d2f8409
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions nikola/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,25 +565,26 @@ def get_crumbs(path, is_file=False):


def get_asset_path(path, themes, files_folders={'files': ''}):
"""Checks which theme provides the path with the given asset,
and returns the "real" path to the asset, relative to the
current directory.
"""
.. versionchanghed:: 6.1.0

This comment has been minimized.

Copy link
@turl

turl Oct 24, 2013

Typo?

Checks which theme provides the path with the given asset,
and returns the "real", absolute path to the asset.
If the asset is not provided by a theme, then it will be checked for
in the FILES_FOLDERS
>>> print(get_asset_path('assets/css/rst.css', ['bootstrap', 'base']))
nikola/data/themes/base/assets/css/rst.css
>>> print(get_asset_path('assets/css/rst.css', ['bootstrap', 'base'])) # doctest: +SKIP
[...]/nikola/data/themes/base/assets/css/rst.css
>>> print(get_asset_path('assets/css/theme.css', ['bootstrap', 'base']))
nikola/data/themes/bootstrap/assets/css/theme.css
>>> print(get_asset_path('assets/css/theme.css', ['bootstrap', 'base'])) # doctest: +SKIP
[...]/nikola/data/themes/bootstrap/assets/css/theme.css
>>> print(get_asset_path('nikola.py', ['bootstrap', 'base'], {'nikola': ''}))
nikola/nikola.py
>>> print(get_asset_path('nikola.py', ['bootstrap', 'base'], {'nikola': ''})) # doctest: +SKIP
[...]/nikola/nikola.py
>>> print(get_asset_path('nikola/nikola.py', ['bootstrap', 'base'],
... {'nikola':'nikola'}))
nikola/nikola.py
>>> print(get_asset_path('nikola/nikola.py', ['bootstrap', 'base'], {'nikola':'nikola'})) # doctest: +SKIP
[...]/nikola/nikola.py
"""
for theme_name in themes:
Expand Down

0 comments on commit d2f8409

Please sign in to comment.