~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_treebuilder.py

  • Committer: Robert Collins
  • Date: 2009-07-07 04:32:13 UTC
  • mto: This revision was merged to the branch mainline in revision 4524.
  • Revision ID: robertc@robertcollins.net-20090707043213-4hjjhgr40iq7gk2d
More informative assertions in xml serialisation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#
14
14
# You should have received a copy of the GNU General Public License
15
15
# along with this program; if not, write to the Free Software
16
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
18
"""Tests for the TreeBuilder helper class."""
19
19
 
37
37
 
38
38
 
39
39
class TestFakeTree(TestCaseWithTransport):
40
 
    
 
40
 
41
41
    def testFakeTree(self):
42
42
        """Check that FakeTree works as required for the TreeBuilder tests."""
43
43
        tree = FakeTree()
49
49
 
50
50
 
51
51
class TestTreeBuilderMemoryTree(tests.TestCaseWithMemoryTransport):
52
 
    
 
52
 
53
53
    def test_create(self):
54
54
        builder = TreeBuilder()
55
55
 
64
64
        tree = FakeTree()
65
65
        builder.start_tree(tree)
66
66
        self.assertRaises(errors.AlreadyBuilding, builder.start_tree, tree)
67
 
        
 
67
 
68
68
    def test_finish_tree_not_started_errors(self):
69
69
        builder = TreeBuilder()
70
70
        self.assertRaises(errors.NotBuilding, builder.finish_tree)