~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionspec.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-02-23 17:00:36 UTC
  • mfrom: (4032.1.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090223170036-3q1v68ewdt8i0to5
(Marius Kruger) Remove all trailing whitespace and add tests to
        enforce this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
        """Old revno:N:path tests"""
277
277
        wta = self.make_branch_and_tree('a')
278
278
        ba = wta.branch
279
 
        
 
279
 
280
280
        wta.commit('Commit one', rev_id='a@r-0-1')
281
281
        wta.commit('Commit two', rev_id='a@r-0-2')
282
282
        wta.commit('Commit three', rev_id='a@r-0-3')
324
324
 
325
325
 
326
326
class TestRevisionSpec_revid(TestRevisionSpec):
327
 
    
 
327
 
328
328
    def test_in_history(self):
329
329
        # We should be able to access revisions that are directly
330
330
        # in the history.
331
331
        self.assertInHistoryIs(1, 'r1', 'revid:r1')
332
332
        self.assertInHistoryIs(2, 'r2', 'revid:r2')
333
 
        
 
333
 
334
334
    def test_missing(self):
335
335
        self.assertInvalid('revid:r3', invalid_as_revision_id=False)
336
336
 
437
437
 
438
438
 
439
439
class TestRevisionSpec_tag(TestRevisionSpec):
440
 
    
 
440
 
441
441
    def make_branch_and_tree(self, relpath):
442
442
        # override format as the default one may not support tags
443
443
        return TestRevisionSpec.make_branch_and_tree(
509
509
 
510
510
 
511
511
class TestRevisionSpec_ancestor(TestRevisionSpec):
512
 
    
 
512
 
513
513
    def test_non_exact_branch(self):
514
514
        # It seems better to require an exact path to the branch
515
515
        # Branch.open() rather than using Branch.open_containing()
545
545
        self.assertRaises(errors.NoCommits,
546
546
                          spec_in_history, 'ancestor:new_tree',
547
547
                                           self.tree.branch)
548
 
                        
 
548
 
549
549
        self.assertRaises(errors.NoCommits,
550
550
                          spec_in_history, 'ancestor:tree',
551
551
                                           new_tree.branch)
566
566
 
567
567
 
568
568
class TestRevisionSpec_branch(TestRevisionSpec):
569
 
    
 
569
 
570
570
    def test_non_exact_branch(self):
571
571
        # It seems better to require an exact path to the branch
572
572
        # Branch.open() rather than using Branch.open_containing()