-
Notifications
You must be signed in to change notification settings - Fork 200
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: Fix scrolling issues #360
Conversation
I still need some tests. I want to check the position of
import time
for i in range(10000):
print(i)
time.sleep(.1)
I am unsure how to do that, are there tests where a console is actually opened? |
Not here, but you can find how to do that in this file: |
I added test but I don't know exactly how to run pytest while the rest is in unittest. Could somebody fix the tests? They all run individually on my machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@impact27, great job at creating a test for this! I left you some comments to simplify it by using the qtbot
fixture, which is part of the pytest-qt
package.
Please add it to this line
https://github.com/jupyter/qtconsole/blob/master/.travis.yml#L8
to be able to use it in our tests.
I don't understand what you mean by this. Pytest runs all our tests, as can be seen here: https://github.com/jupyter/qtconsole/blob/master/.travis.yml#L21 |
I had to run the new tests first for some reason, by renaming the test file, but at least it works. I would be grateful if someone can explain why I need to do that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be grateful if someone can explain why I need to do that.
No idea. Perhaps moving everything to use pytest-qt would fix that problem.
However, if you want to run your new tests first, please use pytest-ordering
and mark them with the @pytest.mark.first
decorator. That will make them run at the beginning of our test suite.
rename test file so it is executed first and the test pass set argv to [] fix
I think this is almost ready. One last comment: is it still necessary to rename |
I didn't manage to make it work, I think it is only reordering tests in a same file. |
Then there's no need to use pytest-ordering, right? I also think it's better to rename |
|
Yep, right. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @impact27!
Fixes #351
Before:
After: