Anonymous avatar 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,)
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.