mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
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:
parent
3cd4722c9b
commit
1ae08acc8f
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user