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: Catch leaks in the test suite #17205

Merged
merged 6 commits into from
Jan 21, 2022
Merged

Conversation

impact27
Copy link
Contributor

@impact27 impact27 commented Jan 17, 2022

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Issue(s) Resolved

Fixes #17213

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct:

@pep8speaks
Copy link

pep8speaks commented Jan 17, 2022

Hello @impact27! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 369:80: E501 line too long (82 > 79 characters)

Comment last updated at 2022-01-21 16:41:32 UTC

line length
@ccordoba12
Copy link
Member

@impact27, could you describe what you're trying to achieve here? Also, where exactly are you fixing issue #17213 in this PR? Sorry, but I can't easily spot that.

@impact27
Copy link
Contributor Author

The goal here is to check that no file or process is opened in a test and not closed. While working on this I noticed #17213. This bug is caused by closing the stdout and stderr file without stopping the restarter. The restarter therefore tries to restart the kernel, but can’t access the files, as they are closed.

@ccordoba12 ccordoba12 changed the title PR: Catch leaks PR: Catch leaks in the test suite Jan 20, 2022
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @impact27 for your help with this! It looks almost ready to me, with the exception of one test you changed to make it pass (which I think is incorrect).

spyder/app/tests/test_mainwindow.py Show resolved Hide resolved
spyder/app/tests/test_mainwindow.py Outdated Show resolved Hide resolved
spyder/app/tests/test_mainwindow.py Show resolved Hide resolved
spyder/app/tests/test_mainwindow.py Show resolved Hide resolved
spyder/app/tests/test_mainwindow.py Outdated Show resolved Hide resolved
spyder/plugins/ipythonconsole/tests/test_ipythonconsole.py Outdated Show resolved Hide resolved
@dalthviz dalthviz added this to the v5.3.0 milestone Jan 21, 2022
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Looks good to me now, thanks @impact27!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on bad IPython config
4 participants