-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Handle output in stderr gracefully when discovering tests #6
Handle output in stderr gracefully when discovering tests #6
Conversation
I've update the PR according to your feedback after a rebase from master. Would you mind taking another look? |
@@ -23,6 +24,11 @@ def main(): | |||
if dialog.status == dialog.CANCEL: | |||
sys.exit(1) | |||
|
|||
if project.errors: | |||
dialog = IgnorableTestLoadErrorDialog(root, project.render_errors()) |
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.
render_errors() has been removed, so this needs to be cleaned up.
trace, | ||
button_text='Retry', | ||
cancel_text='Quit', | ||
) | ||
|
||
def cancel(self, event=None): | ||
self.parent.destroy() |
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.
Good catch noticing this one; see FailedTestDialog for what the implementation should be.
I've updated the PR to reflect your feedback. It now has support for |
Handle output in stderr gracefully when discovering tests
Discovering tests did fail as soon as there is output in
stderr
during the discovery process. This happened even when the output is just aINFO
level log. To prevent this from happening, I have changed theProject
model to collect the errors and only raise an exception if no test can be found and there are errors instderr
. Otherwise,stderr
will be displayed in a stack trace dialog but allow to continue with the discovered tests.I added a few tests for the discovery message. I am not quite sure about the format or your preference, so please let me know if there's anything that need to be changed. Also, I am not sure if the
requirements_test.txt
is the right way to deal with test-only dependencies. How do you want to handle that?