@pytest.mark.network
def test_finder_detects_latest_already_satisfied_pypi_links():
 req = InstallRequirement.from_line('initools', None)
 latest_version = '0.3.1'
 satisfied_by = Mock(location='/path', parsed_version=parse_version(latest_version), version=latest_version)
 req.satisfied_by = satisfied_by
 finder = PackageFinder([], ['http://pypi.python.org/simple'], session=PipSession())
 with pytest.raises(BestVersionAlreadyInstalled):
  finder.find_requirement(req, True)

@ pytest . mark . network def test_finder_detects_latest_already_satisfied_pypi_links ( ) : req = InstallRequirement . from_line ( 'initools' , None ) latest_version = '0.3.1' satisfied_by = Mock ( location = '/path' , parsed_version = parse_version ( latest_version ) , version = latest_version ) req . satisfied_by = satisfied_by finder = PackageFinder ( [ ] , [ 'http://pypi.python.org/simple' ] , session = PipSession ( ) ) with pytest . raises ( BestVersionAlreadyInstalled ) : finder . find_requirement ( req , True )
test packagefinder detects latest already satisfied using pypi links .