Skip to content
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

use pybridge to capture stderr for transcript tests #1210

Closed
wants to merge 13 commits into from
Closed

use pybridge to capture stderr for transcript tests #1210

wants to merge 13 commits into from

Conversation

crotwell
Copy link

@crotwell crotwell commented Mar 1, 2022

use pybridge to capture stderr when running transcripts as tests. Think this addresses at least part of #1185, as stderr is part of the comparison. But this does not address outputing stderr when creating a transcript using history -t.

Possible that simple concatenation is not the right way to create the result for comparison, but at least any self.stderr output will be noticed by the test.

…check for non-existent commands, pwarn and perror
@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Base: 98.58% // Head: 98.58% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (65cae71) compared to base (031832a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1210   +/-   ##
=======================================
  Coverage   98.58%   98.58%           
=======================================
  Files          22       22           
  Lines        5705     5707    +2     
=======================================
+ Hits         5624     5626    +2     
  Misses         81       81           
Impacted Files Coverage Δ
cmd2/transcript.py 93.10% <100.00%> (+0.12%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tleonhardt
Copy link
Member

@crotwell Phillip, thanks for the PR! Can you please run black to auto-format your changes? That way all of our tests will pass.

@anselor @kmvanbrunt You guys are more familiar with the pybridge stuff than I am, could one of you please review this PR and make sure it won't break any existing known workflows?

@tleonhardt
Copy link
Member

@crotwell Formatting is still broken due to isort.

I added a new invoke task you can run with inv format which will auto-format code using both black and isort.

@tleonhardt
Copy link
Member

@kmvanbrunt @anselor Now that all tests are passing, could one or both of you please review this PR?

IMO I don't like that it is only a partial solution. On the other hand, perhaps that is better than no solution?

@tleonhardt
Copy link
Member

@crotwell Thank you very much for this PR. We appreciate your contribution.

My understanding is that this solution is incomplete and likely not the best long-term approach. This PR has existed for almost a year and I am going to close it now.

If someone would like to work on a more complete and appropriate solution in the future, that would be great.

@tleonhardt tleonhardt closed this Jan 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants