[Checkins] SVN: z3c.coverage/trunk/ Prevent spurious test failures (os.listdir() can return the files in any order

Marius Gedminas marius at pov.lt
Thu Feb 21 14:30:03 EST 2008


Log message for revision 84119:
  Prevent spurious test failures (os.listdir() can return the files in any order
  it chooses).
  
  

Changed:
  U   z3c.coverage/trunk/CHANGES.txt
  U   z3c.coverage/trunk/src/z3c/coverage/README.txt

-=-
Modified: z3c.coverage/trunk/CHANGES.txt
===================================================================
--- z3c.coverage/trunk/CHANGES.txt	2008-02-21 18:07:37 UTC (rev 84118)
+++ z3c.coverage/trunk/CHANGES.txt	2008-02-21 19:30:02 UTC (rev 84119)
@@ -2,6 +2,12 @@
 CHANGES
 =======
 
+(unreleased)
+------------
+
+- Bug: sort the results of os.listdir() in README.txt to avoid nondeterministic
+  failures.
+
 1.1.1 (2008-01-31)
 ------------------
 

Modified: z3c.coverage/trunk/src/z3c/coverage/README.txt
===================================================================
--- z3c.coverage/trunk/src/z3c/coverage/README.txt	2008-02-21 18:07:37 UTC (rev 84118)
+++ z3c.coverage/trunk/src/z3c/coverage/README.txt	2008-02-21 19:30:02 UTC (rev 84119)
@@ -25,12 +25,12 @@
 
 Looking at the output directory, we now see several files:
 
-  >>> print '\n'.join(os.listdir(outputDir))
+  >>> print '\n'.join(sorted(os.listdir(outputDir)))
   all.html
+  z3c.coverage.__init__.html
+  z3c.coverage.coveragediff.html
   z3c.coverage.coveragereport.html
-  z3c.coverage.coveragediff.html
   z3c.coverage.html
-  z3c.coverage.__init__.html
   z3c.html
 
 



More information about the Checkins mailing list