File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -2459,6 +2459,40 @@ def test_install_pip_prints_req_chain_local(script: PipTestEnvironment) -> None:
2459
2459
)
2460
2460
2461
2461
2462
+ def test_install_dist_restriction_without_target (script : PipTestEnvironment ) -> None :
2463
+ result = script .pip (
2464
+ "install" , "--python-version=3.1" , "--only-binary=:all:" , expect_error = True
2465
+ )
2466
+ assert (
2467
+ "Can not use any platform or abi specific options unless installing "
2468
+ "via '--target'" in result .stderr
2469
+ ), str (result )
2470
+
2471
+
2472
+ def test_install_dist_restriction_dry_run_doesnt_require_target (
2473
+ script : PipTestEnvironment ,
2474
+ ) -> None :
2475
+ create_basic_wheel_for_package (
2476
+ script ,
2477
+ "base" ,
2478
+ "0.1.0" ,
2479
+ )
2480
+
2481
+ result = script .pip (
2482
+ "install" ,
2483
+ "--python-version=3.1" ,
2484
+ "--only-binary=:all:" ,
2485
+ "--dry-run" ,
2486
+ "--no-cache-dir" ,
2487
+ "--no-index" ,
2488
+ "--find-links" ,
2489
+ script .scratch_path ,
2490
+ "base" ,
2491
+ )
2492
+
2493
+ assert not result .stderr , str (result )
2494
+
2495
+
2462
2496
@pytest .mark .network
2463
2497
def test_install_pip_prints_req_chain_pypi (script : PipTestEnvironment ) -> None :
2464
2498
"""
You can’t perform that action at this time.
0 commit comments