Skip to content

Commit

Permalink
Test passing stdin to the pip-compile without an output file
Browse files Browse the repository at this point in the history
  • Loading branch information
atugushev committed Feb 28, 2019
1 parent fb646cb commit 37ae661
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_cli_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,3 +402,15 @@ def test_default_index_url():
' http://example.com)' + os.linesep
)
assert expected in output


def test_stdin_without_output_file():
"""
The --output-file option is required for STDIN.
"""
runner = CliRunner()
with runner.isolated_filesystem():
out = runner.invoke(cli, ['-n', '-'])

assert out.exit_code == 2
assert '--output-file is required if input is from stdin' in out.output

0 comments on commit 37ae661

Please sign in to comment.