void () { // ARCHIVE doCommentAtTheEndTest("geoip2", "2.2.0", "https://pypi.python.org/packages/source/g/geoip2/geoip2-2.2.0.tar.gz # comment"); doCommentAtTheEndTest("geoip2", "2.2.0", "https://pypi.python.org/packages/source/g/geoip2/geoip2-2.2.0.tar.gz#md5=26259d212447bc840400c25a48275fbc # comment"); doCommentAtTheEndTest("https://github.com/divio/MyProject1/archive/master.zip?1450634746.0107164 # comment"); // VCS doCommentAtTheEndTest("git://git.myproject.org/MyProject#egg=MyProject1 # comment"); doCommentAtTheEndTest("-e git://git.myproject.org/MyProject1 # comment"); doCommentAtTheEndTest("hg+http://hg.myproject.org/MyProject#egg=MyProject1 # comment"); doCommentAtTheEndTest("hg+http://hg.myproject.org/MyProject1 # comment"); doCommentAtTheEndTest("svn+http://svn.myproject.org/MyProject/trunk#egg=MyProject1 # comment"); doCommentAtTheEndTest("svn+http://svn.myproject.org/MyProject1/trunk # comment"); doCommentAtTheEndTest("bzr+http://bzr.myproject.org/MyProject/trunk#egg=MyProject1 # comment"); doCommentAtTheEndTest("bzr+http://bzr.myproject.org/MyProject1/trunk # comment"); // REQUIREMENT final String name = "MyProject1"; final String version = "2.5a20"; doCommentAtTheEndTest(name + " # comment"); doCommentAtTheEndTest(name, version, name + "==" + version + " # comment"); assertEquals(new PyRequirementImpl(name, emptyList(), singletonList(name + "[PDF]"), "[PDF]"), fromLine(name + "[PDF] # comment")); final PyRequirement requirement = new PyRequirementImpl(name, emptyList(), Arrays.asList(name, "--install-option=\"option\""), ""); assertEquals(requirement, fromLine(name + " --install-option=\"option\" # comment")); assertEquals(singletonList(requirement), PyRequirementParser.fromText(name + " \\\n--install-option=\"option\" # comment")); }