Commits

Anonymous committed 22a8cdc

introduced rc so Python's own scheme works too

Comments (0)

Files changed (3)

test_pypi_versions.py

     if sugg == ver:
         matches += 1
     elif sugg == None:
+        print ver
         no_sugg += 1
     else:
         have_sugg += 1
 
         self.assertEquals(suggest('1.0'), '1.0')
         self.assertEquals(suggest('1.0-alpha1'), '1.0a1')
-        self.assertEquals(suggest('1.0rc2'), '1.0c2')
+        self.assertEquals(suggest('1.0c2'), '1.0c2')
         self.assertEquals(suggest('walla walla washington'), None)
+        self.assertEquals(suggest('2.4c1'), '2.4c1')
 
         # from setuptools
         self.assertEquals(suggest('0.4a1.r10'), '0.4a1.post10')
         self.assertEquals(suggest('0.7a1dev-r66608'), '0.7a1.dev66608')
         self.assertEquals(suggest('0.6a9.dev-r41475'), '0.6a9.dev41475')
         self.assertEquals(suggest('2.4preview1'), '2.4c1')
-        self.assertEquals(suggest('2.4rc1'), '2.4c1')
         self.assertEquals(suggest('2.4pre1') , '2.4c1')
         self.assertEquals(suggest('2.1-rc2'), '2.1c2')
 
     (?P<version>\d+\.\d+)          # minimum 'N.N'
     (?P<extraversion>(?:\.\d+)*)   # any number of extra '.N' segments
     (?:
-        (?P<prerel>[abc])          # 'a'=alpha, 'b'=beta, 'c'=release candidate
+        (?P<prerel>[abc]|rc)       # 'a'=alpha, 'b'=beta, 'c'=release candidate
+                                   # 'rc'= alias for release candidate
         (?P<prerelversion>\d+(?:\.\d+)*)
     )?
     (?P<postdev>(\.post(?P<post>\d+))?(\.dev(?P<dev>\d+))?)?