~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_commit.py

  • Committer: Martin Pool
  • Date: 2005-09-15 05:24:56 UTC
  • Revision ID: mbp@sourcefrog.net-20050915052455-195ea48b111406b0
- add test for commit of an empty tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib.selftest import TestCaseInTempDir
21
21
from bzrlib.branch import Branch
22
22
from bzrlib.commit import Commit
 
23
from bzrlib.errors import PointlessCommit
23
24
 
24
25
 
25
26
class TestCommit(TestCaseInTempDir):
62
63
        self.assertFalse(tree.has_id('hello-id'))
63
64
 
64
65
 
 
66
    def test_commit_empty(self):
 
67
        b = Branch('.', init=True)
 
68
        b.commit(message='empty tree', allow_pointless=True)
 
69
        ##self.assertRaises(PointlessCommit,
 
70
        ##                  b.commit,
 
71
        ##                  message='empty tree')
 
72
        b.commit(message='empty tree', allow_pointless=True)
 
73
        self.assertEquals(b.revno(), 2)
 
74
 
 
75
 
 
76
    def test_selective_delete(self):
 
77
        """Selective commit in tree with deletions"""
 
78
 
 
79
 
65
80
    def test_removed_commit(self):
66
81
        """Test a commit with a removed file"""
67
82
        b = Branch('.', init=True)