

def test_tilde(data):
    'Finder can accept a path with ~ in it and will normalize it.'
    session = PipSession()
    with patch('pip.index.os.path.exists', return_value=True):
        finder = PackageFinder(['~/python-pkgs'], [], session=session)
    req = InstallRequirement.from_line('gmpy')
    with pytest.raises(DistributionNotFound):
        finder.find_requirement(req, False)

dataset/ETHPy150Open pypa/pip/tests/unit/test_finder.py test_tilde/original