@@ -553,37 +553,37 @@ def test_command_execution(host):
553
553
def test_pip_package (host ):
554
554
with pytest .warns (DeprecationWarning ):
555
555
assert host .pip_package .get_packages ()["pip" ]["version" ] == "20.3.4"
556
- pytest_package = host .pip_package .get_packages (pip_path = "/v/bin/pip" )["pytest " ]
557
- assert pytest_package ["version" ].startswith ("5 ." )
556
+ pkg = host .pip_package .get_packages (pip_path = "/v/bin/pip" )["requests " ]
557
+ assert pkg ["version" ].startswith ("1 ." )
558
558
with pytest .warns (DeprecationWarning ):
559
559
outdated = host .pip_package .get_outdated_packages (pip_path = "/v/bin/pip" )[
560
- "pytest "
560
+ "requests "
561
561
]
562
- assert outdated ["current" ] == pytest_package ["version" ]
563
- assert int (outdated ["latest" ].split ("." )[0 ]) > 2
562
+ assert outdated ["current" ] == pkg ["version" ]
563
+ assert int (outdated ["latest" ].split ("." )[0 ]) >= 1
564
564
with pytest .warns (DeprecationWarning ):
565
565
assert host .pip_package .check ().succeeded
566
566
567
567
568
568
def test_pip (host ):
569
569
# get_packages
570
570
assert host .pip .get_packages ()["pip" ]["version" ] == "20.3.4"
571
- pytest_package = host .pip .get_packages (pip_path = "/v/bin/pip" )["pytest " ]
572
- assert pytest_package ["version" ].startswith ("5 ." )
571
+ pkg = host .pip .get_packages (pip_path = "/v/bin/pip" )["requests " ]
572
+ assert pkg ["version" ].startswith ("1 ." )
573
573
# outdated
574
- outdated = host .pip .get_outdated_packages (pip_path = "/v/bin/pip" )["pytest " ]
575
- assert outdated ["current" ] == pytest_package ["version" ]
576
- assert int (outdated ["latest" ].split ("." )[0 ]) >= 6
574
+ outdated = host .pip .get_outdated_packages (pip_path = "/v/bin/pip" )["requests " ]
575
+ assert outdated ["current" ] == pkg ["version" ]
576
+ assert int (outdated ["latest" ].split ("." )[0 ]) >= 1
577
577
# check
578
578
assert host .pip .check ().succeeded
579
579
# is_installed
580
580
assert host .pip ("pip" ).is_installed
581
581
assert not host .pip ("does_not_exist" ).is_installed
582
- pytest_package = host .pip ("pytest " , pip_path = "/v/bin/pip" )
583
- assert pytest_package .is_installed
582
+ pkg = host .pip ("requests " , pip_path = "/v/bin/pip" )
583
+ assert pkg .is_installed
584
584
# version
585
585
assert host .pip ("pip" ).version == "20.3.4"
586
- assert pytest_package .version .startswith ("5 ." )
586
+ assert pkg .version .startswith ("1 ." )
587
587
assert host .pip ("does_not_exist" ).version == ""
588
588
589
589
0 commit comments