diff --git a/src/pip/_internal/cli/base_command.py b/src/pip/_internal/cli/base_command.py index 5130a45053f..6a3b8e6c213 100644 --- a/src/pip/_internal/cli/base_command.py +++ b/src/pip/_internal/cli/base_command.py @@ -131,7 +131,6 @@ def _main(self, args: List[str]) -> int: ", ".join(sorted(always_enabled_features)), ) - # Make sure that the --python argument isn't specified after the # subcommand. We can tell, because if --python was specified, # we should only reach this point if we're running in the created diff --git a/tests/functional/test_python_option.py b/tests/functional/test_python_option.py index ca124933e12..ecfd819eb7c 100644 --- a/tests/functional/test_python_option.py +++ b/tests/functional/test_python_option.py @@ -40,6 +40,7 @@ def test_python_interpreter( result = script.pip("--python", env_path, "list", "--format=json") assert json.loads(result.stdout) == before + def test_error_python_option_wrong_location( script: PipTestEnvironment, tmpdir: Path,