Don't redirect stdout if nose machinery is not present #427
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By spawning subprocesses with
stdout = open('/dev/null')
then PyCharmis not able to attach to them.
This is specially painful when debugging the tests in test_kernel(),
where the methods
kernel()
do spawn kernels in subprocesses ifrequired.
I've recorded a quick video showing this in action: https://youtu.be/GfdADoikFzg
More thoughts
I'm not entirely sure on how all of this test machinery behaves, but it doesn't look like nose is being used anymore as the framework of tests.
This can be seen in the
.travis.yml
and the fact that the symboliptest_stdstreams_fileno
which is defined in https://github.com/ipython/ipython/blob/e1b53e9ef91a43b9e275bb9e48b4253218375d87/IPython/testing/iptest.py#L337 is a method, and its usage innew_kernel()
was obtaining a reference to it and not invoking it, which is probably a mistake.