]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
setup: fix test_runner to assert that lines which are output to stderr must end with...
authorZooko O'Whielacronx <zooko@zooko.com>
Tue, 27 Jan 2009 21:35:05 +0000 (14:35 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Tue, 27 Jan 2009 21:35:05 +0000 (14:35 -0700)
src/allmydata/test/test_runner.py

index 7e0f084ce5bfcc9d986f1c83aaa6448e1165a396..1cada5292369efe8f6dab2216525baafb1a8ea1d 100644 (file)
@@ -60,8 +60,9 @@ class CreateNode(unittest.TestCase, common_util.SignalMixin):
             self.failUnlessEqual(out, "")
             self.failUnless("is not empty." in err)
 
-            # Fail if there is a line that doesn't end with a PUNCTUATION MARK.
-            self.failIf(re.search("[^\.!?]\n", err), err)
+            # Fail if there is a non-empty line that doesn't end with a PUNCTUATION MARK.
+            for line in err.splitlines():
+                self.failIf(re.search("[\S][^\.!?]$", line), (line,))
         d.addCallback(_cb2)
 
         c2 = os.path.join(basedir, "c2")
@@ -113,8 +114,9 @@ class CreateNode(unittest.TestCase, common_util.SignalMixin):
             self.failUnlessEqual(out, "")
             self.failUnless("is not empty" in err)
 
-            # Fail if there is a line that doesn't end with a PUNCTUATION MARK.
-            self.failIf(re.search("[^\.!?]\n", err), err)
+            # Fail if there is a non-empty line that doesn't end with a PUNCTUATION MARK.
+            for line in err.splitlines():
+                self.failIf(re.search("[\S][^\.!?]$", line), (line,))
         d.addCallback(_cb2)
 
         c2 = os.path.join(basedir, "c2")