-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add handling for missing isatty attr on stdout #50
Conversation
Ideally this would be a fix in pyexec, but this testr change feels benign to me overall and I think if we get it in trunk and testing it will help to start being able to run some of our tests in a somewhat standard way from pyexec. |
testr/runner.py
Outdated
self._stdout = stdout | ||
|
||
def __getattr__(self, item): | ||
if item == "isatty": |
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 don't think this is needed. See the getattr docs.
Just to be sure I did a test and made an object of this class. Then stdwrapper.isattry()
definitely just goes through the defined isattr
object method.
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.
OK, I removed the if/else in the getattr and retested.
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!
Description
Add handling for missing isatty attr on stdout. This should fix
when trying to run testr tests from fot matlab pyexec.
Interface impacts
Testing
Unit tests
Functional tests
As a regression test -- on fido/linux from a personal ska3 masters conda environment I ran all ska_testr tests with and without this change in my PYTHONPATH and all tests appeared to correctly run and were pass.
From the current testing branch of Matlab I also ran the Quaternion tests successfully using this testr branch (most other packages fail for other reasons):
This compares with not using this patch in testr