Skip to content

Commit

Permalink
Fix test_stdin_and_out
Browse files Browse the repository at this point in the history
The pipe wasn't working here, and the echoed foo did not go
through Yasha. However, the test passed because echoed foo matched
to what was expected.
  • Loading branch information
kblomqvist committed Apr 29, 2018
1 parent 7be2e76 commit 174d2d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ def test_broken_extensions_name_error(tmpdir):
assert b"name 'asd' is not defined" in e.value.output


def test_stdin_and_out():
cmd = ("echo -n \"foo\"", "|", "yasha", "-")
def test_render_template_from_stdin_to_stdout():
cmd = r'echo -n "{{ foo }}" | yasha --foo=bar -'
out = check_output(cmd, shell=True)
assert out == b"foo"
assert out == b"bar"


def test_json_template(tmpdir):
Expand Down

0 comments on commit 174d2d0

Please sign in to comment.