~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionnamespaces.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-20 14:19:21 UTC
  • mfrom: (2598.5.19 nullrevision)
  • Revision ID: pqm@pqm.ubuntu.com-20070820141921-kmbpaev7g9epuy08
NULL_REVISION is returned to indicate the null revision, not None

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
class TestRevisionSpec_revno(TestRevisionSpec):
117
117
 
118
118
    def test_positive_int(self):
119
 
        self.assertInHistoryIs(0, None, '0')
 
119
        self.assertInHistoryIs(0, 'null:', '0')
120
120
        self.assertInHistoryIs(1, 'r1', '1')
121
121
        self.assertInHistoryIs(2, 'r2', '2')
122
122
        self.assertInvalid('3')
133
133
        self.assertInHistoryIs(1, 'r1', '-100')
134
134
 
135
135
    def test_positive(self):
136
 
        self.assertInHistoryIs(0, None, 'revno:0')
 
136
        self.assertInHistoryIs(0, 'null:', 'revno:0')
137
137
        self.assertInHistoryIs(1, 'r1', 'revno:1')
138
138
        self.assertInHistoryIs(2, 'r2', 'revno:2')
139
139
 
289
289
    def test_positive(self):
290
290
        self.assertInHistoryIs(2, 'r2', 'last:1')
291
291
        self.assertInHistoryIs(1, 'r1', 'last:2')
292
 
        self.assertInHistoryIs(0, None, 'last:3')
 
292
        self.assertInHistoryIs(0, 'null:', 'last:3')
293
293
 
294
294
    def test_empty(self):
295
295
        self.assertInHistoryIs(2, 'r2', 'last:')
322
322
        self.assertInHistoryIs(1, 'r1', 'before:-1')
323
323
 
324
324
    def test_before_one(self):
325
 
        self.assertInHistoryIs(0, None, 'before:1')
 
325
        self.assertInHistoryIs(0, 'null:', 'before:1')
326
326
 
327
327
    def test_before_none(self):
328
328
        self.assertInvalid('before:0',
343
343
        new_tree.commit('first', rev_id='new_r1')
344
344
        self.tree.branch.repository.fetch(new_tree.branch.repository,
345
345
                                          revision_id='new_r1')
346
 
        self.assertInHistoryIs(0, None, 'before:revid:new_r1')
 
346
        self.assertInHistoryIs(0, 'null:', 'before:revid:new_r1')
347
347
 
348
348
 
349
349
class TestRevisionSpec_tag(TestRevisionSpec):