Commits

Anonymous committed f068667

Fixed bug in test_pypi_version.py, updated README.txt

  • Participants
  • Parent commits dab7b5f

Comments (0)

Files changed (2)

     --------
     Total Packages  :  8515
     Already Match   :  7478.0 (87.82%)
-    Have Suggestion :  1037.0 (12.18%)
-    No Suggestion   :  0.0 (0.00%)
+    Have Suggestion :  631.0 (7.41%)
+    No Suggestion   :  406.0 (4.77%)
 
 When a tool needs to work with versions, the best strategy is to use
 suggest_rational_version on the versions string. If this function returns

File test_pypi_versions.py

         package_info = pickle.load(f)
 
 #
-## Save pypi package's version info  Get pypi full package list if the file's not found, else restore it
+## Save pypi package's version info  Get pypi full package list if the file's
+## not found, else restore it
 #
 versions = []
 if not os.path.exists(VERSION_PICKLE_FILE):
 
 for ver in versions:
     sugg = suggest_rational_version(ver)
-    if ver == sugg:
+    if sugg == ver:
         matches += 1
-    elif ver == None:
+    elif sugg == None:
         no_sugg += 1
     else:
         have_sugg += 1