Commits

Anonymous committed 17df9a7

now displaying a full report

Comments (0)

Files changed (1)

test_pypi_versions.py

 no_sugg = 0.00
 have_sugg = 0.00
 
+suggs = []
+no_suggs = []
+
 for ver in versions:
     sugg = suggest_normalized_version(ver)
     if sugg == ver:
         matches += 1
     elif sugg == None:
-        print ver
         no_sugg += 1
+        no_suggs.append(ver)
     else:
         have_sugg += 1
+        suggs.append((ver, sugg))
 
 pct = "(%2.2f%%)"
 print "Results:"
 print "--------"
+print ""
+print "Suggestions"
+print "-----------"
+print ""
+for ver, sugg in suggs:
+    print "%s -> %s" % (ver, sugg)
+print ""
+print "No suggestions"
+print "--------------"
+for ver in no_suggs:
+    print ver
+print ""
+print "Summary:"
+print "--------"
 print "Total Packages  : ", total_versions
 print "Already Match   : ", matches, pct % (matches/total_versions*100,)
 print "Have Suggestion : ", have_sugg, pct % (have_sugg/total_versions*100,)