Rev 4686: (Jelmer) Add some more tests for PullResult. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sun Sep 13 12:47:37 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4686 [merge]
revision-id: pqm at pqm.ubuntu.com-20090913114736-13k4s1i0b62l6sno
parent: pqm at pqm.ubuntu.com-20090911154008-l1xi5q6zuot83p2v
parent: jelmer at samba.org-20090913094607-yvtlvnm8drfrfw8v
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2009-09-13 12:47:36 +0100
message:
  (Jelmer) Add some more tests for PullResult.
modified:
  bzrlib/tests/test_branch.py    test_branch.py-20060116013032-97819aa07b8ab3b5
=== modified file 'bzrlib/tests/test_branch.py'
--- a/bzrlib/tests/test_branch.py	2009-08-17 21:15:40 +0000
+++ b/bzrlib/tests/test_branch.py	2009-09-04 13:43:21 +0000
@@ -504,6 +504,23 @@
         a = "%d revisions pulled" % r
         self.assertEqual(a, "10 revisions pulled")
 
+    def test_report_changed(self):
+        r = PullResult()
+        r.old_revid = "old-revid"
+        r.old_revno = 10
+        r.new_revid = "new-revid"
+        r.new_revno = 20
+        f = StringIO()
+        r.report(f)
+        self.assertEqual("Now on revision 20.\n", f.getvalue())
+
+    def test_report_unchanged(self):
+        r = PullResult()
+        r.old_revid = "same-revid"
+        r.new_revid = "same-revid"
+        f = StringIO()
+        r.report(f)
+        self.assertEqual("No revisions to pull.\n", f.getvalue())
 
 
 class _StubLockable(object):




More information about the bazaar-commits mailing list