You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assume we have a test file with syntax errors, now attempt to discover tests.
The discovery process will fail with no indication of the cause.
Using the old approach we'd see the full error message.
Also, we might also consider leveraging pytest's exit codes.
I disagree. why not make it simpler:
The adapter code returns the following info, all in one JSON:
Include stdout
Include stderr
Include the discovered tests
stderr in the same way we do in the functional tests.
Doing this breaks the JSON returned. The output from the discovery needs to be JSON. I don't think we should be looking for begin and end JSON markers.
Also, we shouldn't have to code for pytest exit codes, the whole point of using the adapter is so we don't have to worry about such things. What about unit test & nose or another in the future?
This way, if there are errors, we notify the user.
Either way, what ever is in stdout and stderr in the JSON returned we can dump it into the Python TestLog, as was done in the older version of the extension.
Activity
ericsnowcurrently commentedon Apr 17, 2019
This may mean printing out stdout and stderr in the same way we do in the functional tests.
Also, we might also consider leveraging pytest's exit codes.
DonJayamanne commentedon Apr 18, 2019
I disagree. why not make it simpler:
The adapter code returns the following info, all in one JSON:
Doing this breaks the JSON returned. The output from the discovery needs to be JSON. I don't think we should be looking for begin and end JSON markers.
Also, we shouldn't have to code for pytest exit codes, the whole point of using the adapter is so we don't have to worry about such things. What about
unit test&noseor another in the future?This way, if there are errors, we notify the user.
Either way, what ever is in stdout and stderr in the JSON returned we can dump it into the
Python TestLog, as was done in the older version of the extension.Print stdout/stderr when pytest fails (in adapter script). (#5512)
karrtikr commentedon May 21, 2019
validated