[Checkins] SVN: z3c.coverage/trunk/src/z3c/coverage/coveragediff.txt I have now achieved 100% test coverage for coveragediff.py. The last 1 line

Marius Gedminas marius at pov.lt
Thu Jul 19 17:29:50 EDT 2007


Log message for revision 78199:
  I have now achieved 100% test coverage for coveragediff.py.  The last 1 line
  was the hardest, and I'm not entirely sure passing a dict with '__name__' set
  to '__main__' to execfile() is something that ought to be allowed in this
  universe.
  
  

Changed:
  U   z3c.coverage/trunk/src/z3c/coverage/coveragediff.txt

-=-
Modified: z3c.coverage/trunk/src/z3c/coverage/coveragediff.txt
===================================================================
--- z3c.coverage/trunk/src/z3c/coverage/coveragediff.txt	2007-07-19 21:20:24 UTC (rev 78198)
+++ z3c.coverage/trunk/src/z3c/coverage/coveragediff.txt	2007-07-19 21:29:49 UTC (rev 78199)
@@ -442,3 +442,15 @@
     QUIT
 
 
+coveragediff.py is a script
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+For convenience you can download the ``coveragediff.py`` module and run it
+as a script
+
+    >>> sys.argv = ['coveragediff', sampleinput_dir, another_dir]
+    >>> script_file = os.path.join(z3c.coverage.__path__[0], 'coveragediff.py')
+    >>> execfile(script_file, dict(__name__='__main__'))
+    z3c.coverage.coveragediff: 36 new lines of untested code
+    z3c.coverage.fakenewmodule: new file with 3 lines of untested code (out of 13)
+



More information about the Checkins mailing list