1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00

Merge pull request #3444 from njsmith/quiet-means-quiet

Make install --quiet really quiet
This commit is contained in:
Xavier Fernandez 2016-02-02 13:29:36 +01:00
commit 838d24929f
3 changed files with 21 additions and 0 deletions

View file

@ -1,5 +1,7 @@
**8.1.0 (unreleased)**
* Make ``install --quiet`` really quiet. See #3418.
**8.0.2 (2016-01-21)**

View file

@ -219,6 +219,11 @@ def hidden_cursor(file):
# even via colorama. So don't even try.
if WINDOWS:
yield
# We don't want to clutter the output with control characters if we're
# writing to a file, or if the user is running with --quiet.
# See https://github.com/pypa/pip/issues/3418
elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO:
yield
else:
file.write(HIDE_CURSOR)
try:

View file

@ -235,6 +235,20 @@ def test_install_from_local_directory(script, data):
assert egg_info_folder in result.files_created, str(result)
def test_install_quiet(script, data):
"""
Test that install -q is actually quiet.
"""
# Apparently if pip install -q is not actually quiet, then it breaks
# everything. See:
# https://github.com/pypa/pip/issues/3418
# https://github.com/docker-library/python/issues/83
to_install = data.packages.join("FSPkg")
result = script.pip('install', '-q', to_install, expect_error=False)
assert result.stdout == ""
assert result.stderr == ""
def test_hashed_install_success(script, data, tmpdir):
"""
Test that installing various sorts of requirements with correct hashes