Skip to content

Commit

Permalink
Add tests for --xxx-options warnings and deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Sep 25, 2022
1 parent 65641f1 commit 51c78b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ def test_install_global_option(script: PipTestEnvironment) -> None:
)
assert "INITools==0.1\n" in result.stdout
assert not result.files_created
assert "Implying --no-binary=:all:" in result.stderr
assert "Consider using --config-settings" in result.stderr


def test_install_with_hacked_egg_info(
Expand Down
5 changes: 4 additions & 1 deletion tests/functional/test_install_reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def test_install_option_in_requirements_file_overrides_cli(
reqs_file = script.scratch_path.joinpath("reqs.txt")
reqs_file.write_text("simple --install-option='-O0'")

script.pip(
result = script.pip(
"install",
"--no-index",
"-f",
Expand All @@ -355,6 +355,9 @@ def test_install_option_in_requirements_file_overrides_cli(
simple_args = simple_sdist.args()
assert "install" in simple_args
assert simple_args.index("-O1") < simple_args.index("-O0")
assert "Implying --no-binary=:all:" in result.stderr
assert "Consider using --config-settings" in result.stderr
assert "--install-option is deprecated" in result.stderr


def test_constraints_not_installed_by_default(
Expand Down

0 comments on commit 51c78b4

Please sign in to comment.