Anonymous avatar 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+))?)?
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.