-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cannibalize coala-utils ContextManagers #59
Comments
Mm, For clarity, maybe better to create a new kwarg for it, though? |
#62 is the first step for a stdin-only-capture. I did a POC of revised coala-utils & coala, based on top of #64, code at https://gitlab.com/jayvdb/coala-utils/blob/a8212112f5a6dd214422077cdbe1d0447b1291db/coala_utils/ContextManagers.py#L151 which shows the extra features in stdio-mgr needed to have a comparable feature set. The two usages of last_input (ignoring ContextManagersTest which is a copy of the same in coala-utils, I hope) are worth considering adding here. https://github.com/coala/coala/blob/6a24dac547e5a6936ccd43068f2fff5753744d7b/tests/settings/SectionFillingTest.py#L52 is asserting that the read buffer was not used, which is easy to achieve a different way. https://github.com/coala/coala/blob/3eaae8875055d5340b707adaa53c289dd6b96725/tests/output/ConsoleInteractionTest.py#L219 is asserting that the buffer is fully used, again easy to implement a different way. I had to disable pytest capturing all the way, so something is amiss somewhere, probably in #64 , and even with that the coala test log is full of errors so more is needed. |
Offtopic, another set of similar functions at https://github.com/Erotemic/ubelt/blob/master/ubelt/util_stream.py . We might want to document prior art in the README, or in the docs. |
New issue to curate? |
There are some useful bits of coala-utils ContextManagers which may be desirable features here, especially
simulate_console_inputs
which is extensively used in https://github.com/coala/coala/ testsuite.Most of the concepts in coala-utils ContextManagers are likely already pending issues here, or can be achieved using the existing functionality. I envisage this issue here is mostly to map coala-utils to stdio-mgr, discuss and track progress.
Created https://gitlab.com/coala/coala-utils/issues/88 for the other side, once most of the necessary enhancements are done here. There is no need to replicate exactly the same functionality, or do it all in one release. coala would contain to use its own wrapper, but it would become a thin layer to stdio-mgr , and possibly (lightly) deprecating some bits where the coala-utils tool has no benefits over the stdio-mgr replacement.
The text was updated successfully, but these errors were encountered: