Skip to content

Popup tests #254

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

Merged
merged 1 commit into from
Jan 15, 2016
Merged

Popup tests #254

merged 1 commit into from
Jan 15, 2016

Conversation

ocefpaf
Copy link
Member

@ocefpaf ocefpaf commented Nov 16, 2015

Complements #253 and closes #252.

NB the test_popup_unicode is a known failure.

@ocefpaf
Copy link
Member Author

ocefpaf commented Nov 16, 2015

This PR is not ready. We need:

  • Fix unicode chars test
  • Check for different popup width


def test_popup_ascii():
popup = Popup('Some text.')
_id = list(popup.html._children.items())[0][0]
Copy link
Member Author

Choose a reason for hiding this comment

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

@BibMartin do you have a better suggestion than this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I would have done

_id = list(popup.html._children.keys())[0]

but it's really equivalent.

Copy link
Member Author

Choose a reason for hiding this comment

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

but it's really equivalent.

The result? Yes. But your way is more readable. Changing that...

@themiurgo
Copy link
Contributor

@ocefpaf This list might help in building strong tests.
https://github.com/minimaxir/big-list-of-naughty-strings

@ocefpaf
Copy link
Member Author

ocefpaf commented Nov 17, 2015

@ocefpaf This list might help in building strong tests.
https://github.com/minimaxir/big-list-of-naughty-strings

Thanks! I will take a look. (I like the name 😉)

@ocefpaf ocefpaf self-assigned this Nov 27, 2015
@ocefpaf ocefpaf added bug An issue describing unexpected or malicious behaviour enhancement Feature request or idea about how to make folium better tests A PR or issue related to tests labels Nov 27, 2015
@ocefpaf ocefpaf added this to the v0.2.0 milestone Dec 3, 2015
@ocefpaf ocefpaf force-pushed the popup_tests branch 3 times, most recently from 5368adc to 477884c Compare January 15, 2016 15:02
@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 15, 2016

@BibMartin can you review and merge. I will add more tests later on.

@@ -5,6 +5,9 @@

Classes for drawing maps.
"""

from __future__ import unicode_literals
Copy link
Contributor

Choose a reason for hiding this comment

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

@ocefpaf
Just for curiosity: what is it for ?

Copy link
Member Author

Choose a reason for hiding this comment

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

So we can use "Ça c'est chouette" instead of u"Ça c'est chouette". Embrace the future 😉

@BibMartin
Copy link
Contributor

It's ok. Merging 🎉

BibMartin added a commit that referenced this pull request Jan 15, 2016
@BibMartin BibMartin merged commit faffad4 into python-visualization:master Jan 15, 2016
@ocefpaf ocefpaf deleted the popup_tests branch January 15, 2016 15:28
@ocefpaf
Copy link
Member Author

ocefpaf commented Jan 15, 2016

Thanks!

sanga pushed a commit to sanga/folium that referenced this pull request Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue describing unexpected or malicious behaviour enhancement Feature request or idea about how to make folium better tests A PR or issue related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Popups that contain a quote don't work
3 participants