Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing #2109 (bug in get_asset_path). #2110

Merged
merged 2 commits into from Sep 23, 2015
Merged

Fixing #2109 (bug in get_asset_path). #2110

merged 2 commits into from Sep 23, 2015

Conversation

felixfontein
Copy link
Contributor

Fixes #2109. Also fixes a bug in the docstring, and adds one more example output to make clear what it really does.

None

>>> print(get_asset_path('nikola/nikola.py', ['bootstrap3', 'base'], {'nikola': 'nikola'}))
/.../nikola/nikola.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/.../ ???

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/.../ stands for "some random path on my hdd which I don't want to paste here", like in the already existing examples.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that’s a doctest ellipsis, not a real path

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The others are actually doctests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the new one a doctest, too? Or is some special magic needed to make it a doctest as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a doctest, as it begins with >>> — py.test should pick it up (whether or not doctests are good is another thing)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it passes; if I modify the path, doit doctest fails.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awsome then :-)

@ralsina
Copy link
Member

ralsina commented Sep 23, 2015

Thanks for fixing this Felix!

ralsina added a commit that referenced this pull request Sep 23, 2015
@ralsina ralsina merged commit 9d5093c into master Sep 23, 2015
@ralsina ralsina deleted the fix-get-asset-path branch September 23, 2015 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible bug in get_asset_path?
3 participants