Commits

Anonymous committed f1267fc

fixed development versions being sorted incorrectly, added tests

  • Participants
  • Parent commits 9b3875b

Comments (0)

Files changed (2)

         >>> V('1.0') < V('1.0.post456.dev623')
         True
 
-        >>> V('1.0.post456.dev623') < V('1.0.post456')
+        >>> V('1.0.post456.dev623') < V('1.0.post456')  < V('1.0.post1234')
         True
 
         >>> (V('1.0a1')
         ...  < V('1.0b2')
         ...  < V('1.0c1.dev456')
         ...  < V('1.0c1')
+        ...  < V('1.0.dev7')
+        ...  < V('1.0.dev18')
         ...  < V('1.0.dev456')
+        ...  < V('1.0.dev1234')
         ...  < V('1.0')
         ...  < V('1.0.post456.dev623')  # development version of a post release
         ...  < V('1.0.post456'))
             dev = groups.get('dev')
             postdev = []
             if post is not None:
-                postdev.extend([FINAL_MARKER[0], 'post', post])
+                postdev.extend([FINAL_MARKER[0], 'post', int(post)])
                 if dev is None:
                     postdev.append(FINAL_MARKER[0])
             if dev is not None:
-                postdev.extend(['dev', dev])
+                postdev.extend(['dev', int(dev)])
             parts.append(tuple(postdev))
         else:
             parts.append(FINAL_MARKER)