-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Strip the IPY_MODEL_ prefix from widget IDs before referencing them. #6377
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
Conversation
@jdfreder, @ellisonbg, ready for review. I can't believe I made this silly mistake. |
I'm confused, why haven't the child serialization tests been failing in master? Edit: Would you be able to write a test for this? It seems like an important piece of the code to be untested for regressions. |
I'd love to write a test. Do you want to write a nose testing framework for the python side of widgets? If I had, say, a mock Comm object that I could plug into a widget, and then send/receive messages on this mock comm instance, it would be easy to test this. |
By the way, I'm a little confused why this wasn't noticed before too. Perhaps we haven't seen a case where js was sending back a reference to a model? |
As of now, I've been writing these in the CasperJS tests as embedded strings. Each time I need to test something in Python, I run the string as a cell, use Python print, and then use JS to check the output of that cell. It's ugly, painful, and brittle, but it works. 🐴 |
Yeah, I guess that makes sense. We must not be echoing back the values after they're sent to the front-end, which is a good thing and is as designed. 😄 |
(just want to make sure this doesn't fall off the table). I'm happy to write a test once we have a framework to test the python side of widgets (I think basically all we need is a mock Comm object). Writing such a framework is on my TODO list, but not near the top :(. |
Sorry, I was on vacation the past two weeks, I really should have merged this before I had left. I'll open an issue to remind you and/or I to write a test for this (low priority). |
Strip the IPY_MODEL_ prefix from widget IDs before referencing them.
See #6485 for tests |
Strip the IPY_MODEL_ prefix from widget IDs before referencing them.
This was a silly error, probably due to me.