Skip to content

Conversation

@jdfreder
Copy link
Contributor

@jdfreder jdfreder commented Feb 4, 2015

Corrects a variable's scope.

closes #7679

@SylvainCorlay

@jdfreder jdfreder added this to the 3.0 milestone Feb 4, 2015
@SylvainCorlay
Copy link
Member

Checked out the branch and it does fix the issue.
(One needs to re-execute the cells once first or clean the local storage, because whatever was in the local storage before your fix was probably wrong. )

@minrk
Copy link
Member

minrk commented Feb 4, 2015

@jdfreder thanks for the fix, @SylvainCorlay thanks for the report and confirmation of the fix.

@jdfreder is this something that can be reasonably tested?

@SylvainCorlay
Copy link
Member

phantomjs apparently supports local storage.

@jdfreder
Copy link
Contributor Author

jdfreder commented Feb 4, 2015

@minrk it's ugly, but the last commit adds a test.

@minrk
Copy link
Member

minrk commented Feb 4, 2015

It wasn't possible to test the return value of get_state directly? That wasn't incorrect?

@SylvainCorlay
Copy link
Member

In general, now that you are using the local storage for the widgets, Phantomjs' local storage should probably be cleared before running any test suite.
http://stackoverflow.com/questions/18408868/disabling-localstorage-on-phantomjs-for-clean-testing

@jasongrout
Copy link
Member

for what it's worth, @jdfreder's analysis and fix of the problem seems appropriate to me.

@SylvainCorlay
Copy link
Member

Yeah, 👍 on this.

@jdfreder
Copy link
Contributor Author

jdfreder commented Feb 4, 2015

@minrk yeah, the get_state call is what was returning an incorrect value. I implemented the test the way I did so it tests the entire feature.

@minrk
Copy link
Member

minrk commented Feb 4, 2015

Makes sense, you just said it was ugly, and I thought there might be a way for it to be less so. Thanks!

minrk added a commit that referenced this pull request Feb 4, 2015
Fix widget view persistence.
@minrk minrk merged commit 6e65529 into ipython:master Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Widget persistence bug

4 participants