void () { final PyPackage firstPackageWithLocalVersion = new PyPackage("foo", "1.0+foo0100"); final PyPackage secondPackageWithLocalVersion = new PyPackage("foo", "1.0+foo0101"); final PyRequirement requirement = fromLine("foo==1.0"); assertEquals(firstPackageWithLocalVersion, requirement.match(singletonList(firstPackageWithLocalVersion))); assertEquals(secondPackageWithLocalVersion, requirement.match(singletonList(secondPackageWithLocalVersion))); final PyRequirement requirementWithLocalVersion = fromLine("foo==1.0+foo0100"); assertEquals(firstPackageWithLocalVersion, requirementWithLocalVersion.match(singletonList(firstPackageWithLocalVersion))); assertNull(requirementWithLocalVersion.match(singletonList(secondPackageWithLocalVersion))); }