-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[3.0.x] Revert changes in tests breaking python 2.7 #6103
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
Conversation
Related to commit 4e9f730
@@ -51,46 +51,50 @@ def func_pure_implicit() -> cython.int: | |||
def func_pure_noexcept() -> cython.int: | |||
raise RuntimeError | |||
|
|||
def print_stderr(func): | |||
def return_stderr(func): |
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.
def return_stderr(func): | |
def print_stderr(func): |
func() | ||
finally: | ||
sys.stderr = old_stderr | ||
return stderr.getvalue().strip() |
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.
return stderr.getvalue().strip() | |
return print(stderr.getvalue()) |
I was wondering about doing this, which I think would let us leave everything else unchanged.
I'll make an alternative PR will my suggestion for simplicity. |
Feel free to close this PR if you prefer yours. |
I've done #6105 which I think is a smaller change, so I'll merge that assuming it works. I've checked it locally though and it seems fine. Thanks for looking into this quickly. |
Thank you @da-woods ! |
Related to commit 4e9f730