コード例 #1
0
 def test_commmit_nomessage(self):
     transaction.begin()
     trans = transaction.current()
     trans.set_blob(['foo'], 'bar'.encode('utf-8'))
     self.assert_commit_count(0)
     assert_raises(GitError, transaction.commit)
     self.assert_commit_count(0)
     transaction.rollback()
コード例 #2
0
 def test_commmit_nomessage(self):
     transaction.begin()
     trans = transaction.current()
     trans.set_blob(['foo'], 'bar'.encode('utf-8'))
     self.assert_commit_count(0)
     assert_raises(GitError, transaction.commit)
     self.assert_commit_count(0)
     transaction.rollback()
コード例 #3
0
 def test_commit(self):
     transaction.begin()
     trans = transaction.current()
     trans.set_blob(['foo'], 'bar'.encode('utf-8'))
     trans.add_message('foobar')
     self.assert_commit_count(0)
     transaction.commit()
     self.assert_commit_count(1)
     self.assert_file_exists('foo')
コード例 #4
0
 def test_commit(self):
     transaction.begin()
     trans = transaction.current()
     trans.set_blob(['foo'], 'bar'.encode('utf-8'))
     trans.add_message('foobar')
     self.assert_commit_count(0)
     transaction.commit()
     self.assert_commit_count(1)
     self.assert_file_exists('foo')
コード例 #5
0
 def test_commit_nochanges(self):
     transaction.begin()
     self.assert_commit_count(0)
     assert_raises(GitError, transaction.commit)
     self.assert_commit_count(0)
     transaction.rollback()
コード例 #6
0
 def test_commit_nochanges(self):
     transaction.begin()
     self.assert_commit_count(0)
     assert_raises(GitError, transaction.commit)
     self.assert_commit_count(0)
     transaction.rollback()