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

PR: Enclosing quotes of sys.argv clearing instruction are now consistent #3997

Merged
merged 16 commits into from
Jan 22, 2017

Conversation

andfoy
Copy link
Member

@andfoy andfoy commented Jan 18, 2017

Fixes #3987

@ccordoba12 ccordoba12 added this to the v3.1.1 milestone Jan 18, 2017
@ccordoba12
Copy link
Member

@andfoy, did you test this change? Is it working fine for you now?

@ccordoba12
Copy link
Member

And don't worry the failing tests in Travis, that's not related to your work :-)

@andfoy
Copy link
Member Author

andfoy commented Jan 18, 2017

@ccordoba12 I tested them indeed!

@ccordoba12
Copy link
Member

Ok, great!

@ccordoba12
Copy link
Member

@goanpeca, could you instruct @andfoy on how to add a test for this?

@goanpeca
Copy link
Member

lets have a hangout tomorrow please ping me

@ccordoba12
Copy link
Member

@andfoy, please have the hangout with @goanpeca and add a test for this tomorrow. I plan to release 3.1.1 on Saturday, so that's fine :-)

@goanpeca
Copy link
Member

goanpeca commented Jan 21, 2017

@andfoy this is looking great, good job :-), but my questions is, why did we use the plugin and not the client? (that is the main widget that the plugin uses)

I guess is this one. I say it because we should not need to use the plugin (and add all those if not self.testing)

@andfoy
Copy link
Member Author

andfoy commented Jan 21, 2017

@goanpeca Well, to initialize the client, it is necessary to initialize an IPython kernel, along to other variables only known to the plugin.

@goanpeca
Copy link
Member

goanpeca commented Jan 21, 2017

@goanpeca Well, to initialize the client, it is necessary to initialize an IPython kernel, along to other variables only known to the plugin.

Ok, in that case @ccordoba12 we will need to rework that widget logic (in another PR in the future), cause the ipython console (as a whole widget) should be self contained, no?

qtbot.keyClicks(client.get_control(), 'import sys;A = len(sys.argv)')
qtbot.keyPress(client.get_control(), Qt.Key_Return)
len_argv = shell.get_value("A")
assert len_argv > 0
Copy link
Member

Choose a reason for hiding this comment

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

Should this be an specific value for the test?

1 or 2 or exactly 1 or 2? that would make the test more robust

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it should be exactly one

Copy link
Member

@goanpeca goanpeca Jan 21, 2017

Choose a reason for hiding this comment

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

Then lets make it assert len_argv == 1

qtbot, ipy = botipython
shell = ipy.get_current_shellwidget()
client = ipy.get_current_client()
with qtbot.waitSignal(client.shell_ready, timeout=6000) as blocker:
Copy link
Member

Choose a reason for hiding this comment

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

For readability lets add an empty space before the with

@ccordoba12
Copy link
Member

why did we use the plugin and not the client? (that is the main widget that the plugin uses)

What @andfoy did was the right thing to do because the plugin is the one in charge of starting kernels and assigning them to clients.

we will need to rework that widget logic (in another PR in the future), cause the ipython console (as a whole widget) should be self contained, no?

Hard to do it because it needs to know about other plugins. But we could try to do it.

@ccordoba12
Copy link
Member

ccordoba12 commented Jan 22, 2017

Great good @andfoy! Thanks a lot for the IPython console tests :-)

I also took the opportunity to fix some other tests that were failing locally.

@ccordoba12 ccordoba12 merged commit ac57835 into spyder-ide:3.1.x Jan 22, 2017
ccordoba12 added a commit that referenced this pull request Jan 22, 2017
@andfoy andfoy deleted the sys_argv_quotes branch January 22, 2017 17:06
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.

3 participants