def test_skip_invalid_wheel_link(self, caplog, data):
        req = InstallRequirement.from_line("invalid")
        # data.find_links contains "invalid.whl", which is an invalid wheel
        finder = PackageFinder(
            [data.find_links],
            [],
            session=PipSession(),
        )
        with pytest.raises(DistributionNotFound):
            finder.find_requirement(req, True)

        assert (
            "invalid.whl; invalid wheel filename"
            in caplog.text()
        )
Test if PackageFinder skips invalid wheel filenames
dataset/ETHPy150Open pypa/pip/tests/unit/test_finder.py/TestWheel.test_skip_invalid_wheel_link