~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revisionnamespaces.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-21 22:25:48 UTC
  • mto: This revision was merged to the branch mainline in revision 1979.
  • Revision ID: john@arbash-meinel.com-20060821222548-ba891368103b7bf5
A small bugfix, and more tests for revno:

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
        # TODO: In the future, a negative number that is too large
244
244
        # may be translated into the first revision
245
245
        self.assertInvalid('revno:-4')
 
246
 
 
247
    def test_invalid_number(self):
 
248
        # Get the right exception text
 
249
        try:
 
250
            int('X')
 
251
        except ValueError, e:
 
252
            pass
 
253
        self.assertInvalid('revno:X', extra='; ' + str(e))
 
254
 
 
255
    def test_missing_number_and_branch(self):
 
256
        self.assertInvalid('revno::',
 
257
                           extra='; cannot have an empty revno and no branch')