Commits

Anonymous committed 237c2fb

added Eby use case (2.1-rc2 -> 2.1c2)

Comments (0)

Files changed (2)

         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'), None)         # no suggestion
+        self.assertEquals(suggest('2.1-rc2'), '2.1c2')
 
 def test_suite():
     README = os.path.join(os.path.dirname(__file__), 'README.txt')
 
     # Clean '.pre' (normalized from '-pre' above) instead of 'c' usage:
     #   0.2.pre1        ->  0.2c1
-    #   0.2.pre1        ->  0.2c1
+    #   0.2-c1         ->  0.2c1
     #   1.0preview123   ->  1.0c123
     # PyPI stats: ~21 (0.62%) better
-    rs = re.sub(r"\.?(pre|preview)(\d+)$", r"c\g<2>", rs)
+    rs = re.sub(r"\.?(pre|preview|-c)(\d+)$", r"c\g<2>", rs)
 
     try:
         RationalVersion(rs)