setup: fix test_runner to assert that lines which are output to stderr must end with a punctuation mark (apparently re.search("x$", "x\r\n") does not match. :-()

This commit is contained in:
Zooko O'Whielacronx 2009-01-27 14:35:05 -07:00
parent 3cd4722c9b
commit 1ae08acc8f

View 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")