def test_parses_legacy_requirement_invalid(self, requirement): with pytest.raises(ValueError): pypi._parse_legacy_requirement(requirement)
def test_parses_legacy_requirement_valid(self, requirement, expected): parsed = pypi._parse_legacy_requirement(requirement) assert parsed == expected