~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-06 15:15:44 UTC
  • mfrom: (5835 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5836.
  • Revision ID: john@arbash-meinel.com-20110506151544-atzxeezfwssnlacr
Merge bzr.dev 5835 in prep for release-notes updates

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
    tests,
53
53
    transport,
54
54
    workingtree,
 
55
    workingtree_3,
 
56
    workingtree_4,
55
57
    )
56
58
from bzrlib.repofmt import (
57
59
    groupcompress_repo,
338
340
        from bzrlib.tests.per_workingtree import make_scenarios
339
341
        server1 = "a"
340
342
        server2 = "b"
341
 
        formats = [workingtree.WorkingTreeFormat4(),
342
 
                   workingtree.WorkingTreeFormat3(),]
 
343
        formats = [workingtree_4.WorkingTreeFormat4(),
 
344
                   workingtree_3.WorkingTreeFormat3(),]
343
345
        scenarios = make_scenarios(server1, server2, formats)
344
346
        self.assertEqual([
345
347
            ('WorkingTreeFormat4',
375
377
            )
376
378
        server1 = "a"
377
379
        server2 = "b"
378
 
        formats = [workingtree.WorkingTreeFormat4(),
379
 
                   workingtree.WorkingTreeFormat3(),]
 
380
        formats = [workingtree_4.WorkingTreeFormat4(),
 
381
                   workingtree_3.WorkingTreeFormat3(),]
380
382
        scenarios = make_scenarios(server1, server2, formats)
381
383
        self.assertEqual(7, len(scenarios))
382
384
        default_wt_format = workingtree.format_registry.get_default()
383
 
        wt4_format = workingtree.WorkingTreeFormat4()
384
 
        wt5_format = workingtree.WorkingTreeFormat5()
 
385
        wt4_format = workingtree_4.WorkingTreeFormat4()
 
386
        wt5_format = workingtree_4.WorkingTreeFormat5()
385
387
        expected_scenarios = [
386
388
            ('WorkingTreeFormat4',
387
389
             {'bzrdir_format': formats[0]._matchingbzrdir,
453
455
        from bzrlib.tests.per_intertree import (
454
456
            make_scenarios,
455
457
            )
456
 
        from bzrlib.workingtree import WorkingTreeFormat3, WorkingTreeFormat4
 
458
        from bzrlib.workingtree_3 import WorkingTreeFormat3
 
459
        from bzrlib.workingtree_4 import WorkingTreeFormat4
457
460
        input_test = TestInterTreeScenarios(
458
461
            "test_scenarios")
459
462
        server1 = "a"
2810
2813
        self.assertEqual(remaining_names, _test_ids(split_suite[1]))
2811
2814
 
2812
2815
 
2813
 
class TestCheckInventoryShape(tests.TestCaseWithTransport):
 
2816
class TestCheckTreeShape(tests.TestCaseWithTransport):
2814
2817
 
2815
 
    def test_check_inventory_shape(self):
 
2818
    def test_check_tree_shape(self):
2816
2819
        files = ['a', 'b/', 'b/c']
2817
2820
        tree = self.make_branch_and_tree('.')
2818
2821
        self.build_tree(files)
2819
2822
        tree.add(files)
2820
2823
        tree.lock_read()
2821
2824
        try:
2822
 
            self.check_inventory_shape(tree.inventory, files)
 
2825
            self.check_tree_shape(tree, files)
2823
2826
        finally:
2824
2827
            tree.unlock()
2825
2828