testtools-dev team mailing list archive
-
testtools-dev team
-
Mailing list archive
-
Message #00442
[Merge] lp:~mwhudson/testtools/no-newline-for-mismatchesall into lp:testtools
Michael Hudson-Doyle has proposed merging lp:~mwhudson/testtools/no-newline-for-mismatchesall into lp:testtools with lp:~mwhudson/testtools/trivial as a prerequisite.
Requested reviews:
testtools developers (testtools-dev)
Related bugs:
#686790 trailing newline added by MismatchesAll.describe can be ugly
https://bugs.launchpad.net/bugs/686790
This branch just removes the final newline from the description of MismatchesAll, which turns out to be more ugly than useful in practice.
--
https://code.launchpad.net/~mwhudson/testtools/no-newline-for-mismatchesall/+merge/43486
Your team testtools developers is requested to review the proposed merge of lp:~mwhudson/testtools/no-newline-for-mismatchesall into lp:testtools.
=== modified file 'testtools/matchers.py'
--- testtools/matchers.py 2010-12-11 00:14:50 +0000
+++ testtools/matchers.py 2010-12-12 23:51:08 +0000
@@ -316,7 +316,7 @@
descriptions = ["Differences: ["]
for mismatch in self.mismatches:
descriptions.append(mismatch.describe())
- descriptions.append("]\n")
+ descriptions.append("]")
return '\n'.join(descriptions)
=== modified file 'testtools/tests/test_matchers.py'
--- testtools/tests/test_matchers.py 2010-12-11 00:14:50 +0000
+++ testtools/tests/test_matchers.py 2010-12-12 23:51:08 +0000
@@ -247,8 +247,7 @@
Got:
3
-]
-""",
+]""",
"3", MatchesAny(DocTestMatches("1"), DocTestMatches("2")))]
@@ -264,8 +263,7 @@
describe_examples = [("""Differences: [
1 == 1
-]
-""",
+]""",
1, MatchesAll(NotEquals(1), NotEquals(2)))]
Follow ups