def test_suggest_normalized_version(self): self.failUnlessEqual(suggest('1.0'), '1.0') self.failUnlessEqual(suggest('1.0-alpha1'), '1.0a1') self.failUnlessEqual(suggest('1.0c2'), '1.0c2') self.failUnlessEqual(suggest('walla walla washington'), None) self.failUnlessEqual(suggest('2.4c1'), '2.4c1') # from setuptools self.failUnlessEqual(suggest('0.4a1.r10'), '0.4a1.post10') self.failUnlessEqual(suggest('0.7a1dev-r66608'), '0.7a1.dev66608') self.failUnlessEqual(suggest('0.6a9.dev-r41475'), '0.6a9.dev41475') self.failUnlessEqual(suggest('2.4preview1'), '2.4c1') self.failUnlessEqual(suggest('2.4pre1') , '2.4c1') self.failUnlessEqual(suggest('2.1-rc2'), '2.1c2') # from pypi self.failUnlessEqual(suggest('0.1dev'), '0.1.dev0') self.failUnlessEqual(suggest('0.1.dev'), '0.1.dev0') # we want to be able to parse Twisted # development versions are like post releases in Twisted self.failUnlessEqual(suggest('9.0.0+r2363'), '9.0.0.post2363') # pre-releases are using markers like "pre1" self.failUnlessEqual(suggest('9.0.0pre1'), '9.0.0c1') # we want to be able to parse Tcl-TK # they use "p1" "p2" for post releases self.failUnlessEqual(suggest('1.4p1'), '1.4.post1') # from darcsver self.failUnlessEqual(suggest('1.8.1-r4956'), '1.8.1.post4956') # zetuptoolz self.failUnlessEqual(suggest('0.6c16dev3'), '0.6c16.dev3')
def test_suggest_normalized_version(self): self.failUnlessEqual(suggest('1.0'), '1.0') self.failUnlessEqual(suggest('1.0-alpha1'), '1.0a1') self.failUnlessEqual(suggest('1.0c2'), '1.0c2') self.failUnlessEqual(suggest('walla walla washington'), None) self.failUnlessEqual(suggest('2.4c1'), '2.4c1') # from setuptools self.failUnlessEqual(suggest('0.4a1.r10'), '0.4a1.post10') self.failUnlessEqual(suggest('0.7a1dev-r66608'), '0.7a1.dev66608') self.failUnlessEqual(suggest('0.6a9.dev-r41475'), '0.6a9.dev41475') self.failUnlessEqual(suggest('2.4preview1'), '2.4c1') self.failUnlessEqual(suggest('2.4pre1'), '2.4c1') self.failUnlessEqual(suggest('2.1-rc2'), '2.1c2') # from pypi self.failUnlessEqual(suggest('0.1dev'), '0.1.dev0') self.failUnlessEqual(suggest('0.1.dev'), '0.1.dev0') # we want to be able to parse Twisted # development versions are like post releases in Twisted self.failUnlessEqual(suggest('9.0.0+r2363'), '9.0.0.post2363') # pre-releases are using markers like "pre1" self.failUnlessEqual(suggest('9.0.0pre1'), '9.0.0c1') # we want to be able to parse Tcl-TK # they use "p1" "p2" for post releases self.failUnlessEqual(suggest('1.4p1'), '1.4.post1') # from darcsver self.failUnlessEqual(suggest('1.8.1-r4956'), '1.8.1.post4956') # zetuptoolz self.failUnlessEqual(suggest('0.6c16dev3'), '0.6c16.dev3')