This commit is contained in:
q0w 2023-11-20 13:00:37 +01:00 committed by GitHub
commit 764e6fb912
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

1
news/10915.bugfix.rst Normal file
View File

@ -0,0 +1 @@
Suppress the progress bar, when running with ``--log`` and ``--quiet``.

View File

@ -305,6 +305,9 @@ class RequirementCommand(IndexGroupCommand):
"fast-deps has no effect when used with the legacy resolver."
)
if options.quiet:
options.progress_bar = "off"
return RequirementPreparer(
build_dir=temp_build_dir_path,
src_dir=options.src_dir,

View File

@ -580,6 +580,17 @@ def test_install_quiet(script: PipTestEnvironment, data: TestData) -> None:
assert result.stderr == ""
@pytest.mark.network
def test_install_quiet_log(script: PipTestEnvironment, data: TestData) -> None:
"""
Test suppressing the progress bar with --quiet and --log.
"""
logfile = script.scratch_path / "log"
result = script.pip("install", "-qqq", "setuptools==62.0.0", "--log", logfile)
assert result.stdout == ""
assert result.stderr == ""
def test_hashed_install_success(
script: PipTestEnvironment, data: TestData, tmpdir: Path
) -> None: