-
Notifications
You must be signed in to change notification settings - Fork 81
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 pipe_once special command #193
Conversation
else: | ||
with tempfile.NamedTemporaryFile(delete=False) as f: | ||
litecli.packages.special.execute(None, "\\pipe_once tee " + f.name) | ||
litecli.packages.special.write_pipe_once("hello world") |
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 changed this up from mycli, using tee
to write the output to a file which can then be checked. But I did notice around here that mycli is using write_once in this test instead of write_pipe_once.
tests/test_special_iocommands.py
Outdated
litecli.packages.special.write_pipe_once("hello world") | ||
litecli.packages.special.unset_pipe_once_if_written() | ||
else: | ||
with tempfile.NamedTemporaryFile(delete=False) as f: |
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.
Curious why the delete=False
here?
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.
Must have copied from above or elsewhere. But looks like if we know we aren't on windows we don't need this. Removed!
Apart from the one minor comment in the test, this looks good to me. |
Thank you for taking the time to do this. I appreciate it very much. Thanks for pointing out the oversight in mycli test. I'll fix that as well. 😄 |
Mostly copied from mycli. Add tests for once as part of getting that going. Updates dbcli#192
Description
Updates #192
Adds
\pipe_once
/\|
command for sending output to a program. Mostly copied from the same in mycli.I also added a test for
.once
as part of getting started and changed it slightly to be structured more like mycli's version.Checklist
CHANGELOG.md
file.