~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Jelmer Vernooij
  • Date: 2009-09-04 13:43:21 UTC
  • mto: This revision was merged to the branch mainline in revision 4686.
  • Revision ID: jelmer@samba.org-20090904134321-jb6vadszt2mxfafy
Add two more tests for PullResult.

Show diffs side-by-side

added added

removed removed

Lines of Context:
504
504
        a = "%d revisions pulled" % r
505
505
        self.assertEqual(a, "10 revisions pulled")
506
506
 
 
507
    def test_report_changed(self):
 
508
        r = PullResult()
 
509
        r.old_revid = "old-revid"
 
510
        r.old_revno = 10
 
511
        r.new_revid = "new-revid"
 
512
        r.new_revno = 20
 
513
        f = StringIO()
 
514
        r.report(f)
 
515
        self.assertEqual("Now on revision 20.\n", f.getvalue())
 
516
 
 
517
    def test_report_unchanged(self):
 
518
        r = PullResult()
 
519
        r.old_revid = "same-revid"
 
520
        r.new_revid = "same-revid"
 
521
        f = StringIO()
 
522
        r.report(f)
 
523
        self.assertEqual("No revisions to pull.\n", f.getvalue())
507
524
 
508
525
 
509
526
class _StubLockable(object):