From 082fabe89e362fe47d56a3816272da3542ec38a3 Mon Sep 17 00:00:00 2001 From: Albert Tugushev Date: Fri, 15 Feb 2019 23:00:19 +0300 Subject: [PATCH] Test a whole help line --- tests/test_cli.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index 5359cfcb1..e6bb85c0e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -447,5 +447,12 @@ def test_default_index_url(): status, output = _invoke([sys.executable, '-m', 'piptools', 'compile', '--help']) output = output.decode('utf-8') + # Click's subprocess output has \r\r\n line endings on win py27. Fix it. + output = output.replace('\r\r', '\r') + assert status == 0 - assert 'http://example.com' in output + expected = ( + ' -i, --index-url TEXT Change index URL (defaults to' + os.linesep + + ' http://example.com)' + os.linesep + ) + assert expected in output