Rev 2297: Make tests for truncation of status output more robust on wide terminals. in http://sourcefrog.net/bzr/trivial
Martin Pool
mbp at sourcefrog.net
Wed Feb 21 07:59:53 GMT 2007
At http://sourcefrog.net/bzr/trivial
------------------------------------------------------------
revno: 2297
revision-id: mbp at sourcefrog.net-20070221075917-aum4hz1p7nirak7l
parent: pqm at pqm.ubuntu.com-20070220091037-861977f648914cc0
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: trivial
timestamp: Wed 2007-02-21 18:59:17 +1100
message:
Make tests for truncation of status output more robust on wide terminals.
(Relates to bug #56011)
modified:
bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
=== modified file 'bzrlib/tests/blackbox/test_status.py'
--- a/bzrlib/tests/blackbox/test_status.py 2007-02-06 14:02:32 +0000
+++ b/bzrlib/tests/blackbox/test_status.py 2007-02-21 07:59:17 +0000
@@ -143,17 +143,17 @@
wt.commit(u"\N{TIBETAN DIGIT TWO} Empty commit 2")
merge(["./branch", -1], [None, None], this_dir = './copy')
message = self.status_string(wt2)
- self.assert_(message.startswith("pending merges:\n"))
- self.assert_(message.endswith("Empty commit 2\n"))
+ self.assertStartsWith(message, "pending merges:\n")
+ self.assertEndsWith(message, "Empty commit 2\n")
wt2.commit("merged")
# must be long to make sure we see elipsis at the end
- wt.commit("Empty commit 3 " +
- "blah blah blah blah " * 10)
+ wt.commit("Empty commit 3 " +
+ "blah blah blah blah " * 100)
merge(["./branch", -1], [None, None], this_dir = './copy')
message = self.status_string(wt2)
- self.assert_(message.startswith("pending merges:\n"))
+ self.assertStartsWith(message, "pending merges:\n")
self.assert_("Empty commit 3" in message)
- self.assert_(message.endswith("...\n"))
+ self.assertEndsWith(message, "...\n")
def test_branch_status_specific_files(self):
"""Tests branch status with given specific files"""
More information about the bazaar-commits
mailing list