~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_tree/test_test_trees.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
        self.assertEqual([], tree.get_parent_ids())
31
31
        self.assertEqual([], tree.conflicts())
32
32
        self.assertEqual([], list(tree.unknowns()))
33
 
        self.assertEqual(['empty-root-id'], list(iter(tree)))
 
33
        self.assertEqual(['empty-root-id'], list(tree.all_file_ids()))
34
34
        self.assertEqual(
35
35
            [('', 'empty-root-id')],
36
36
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
46
46
        # __iter__ has no strongly defined order
47
47
        self.assertEqual(
48
48
            set(['root-id', 'a-id', 'b-id', 'c-id']),
49
 
            set(iter(tree)))
 
49
            set(tree.all_file_ids()))
50
50
        self.assertEqual(
51
51
            [('', 'root-id'), ('a', 'a-id'), ('b', 'b-id'), ('b/c', 'c-id')],
52
52
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
64
64
        # __iter__ has no strongly defined order
65
65
        self.assertEqual(
66
66
            set(['root-id', 'a-id', 'b-id', 'c-id']),
67
 
            set(iter(tree)))
 
67
            set(tree.all_file_ids()))
68
68
        self.assertEqual(
69
69
            [('', 'root-id'), ('a', 'a-id'), ('b', 'b-id'), ('b/c', 'c-id')],
70
70
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
82
82
        # __iter__ has no strongly defined order
83
83
        self.assertEqual(
84
84
            set(['root-id', 'a-id', 'b-id', 'c-id']),
85
 
            set(iter(tree)))
 
85
            set(tree.all_file_ids()))
86
86
        self.assertEqual(
87
87
            [('', 'root-id'), ('a', 'a-id'), ('b', 'b-id'), ('b/c', 'c-id')],
88
88
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
100
100
        # __iter__ has no strongly defined order
101
101
        self.assertEqual(
102
102
            set(['root-id', 'a-id', 'b-id', 'c-id']),
103
 
            set(iter(tree)))
 
103
            set(tree.all_file_ids()))
104
104
        self.assertEqual(
105
105
            [('', 'root-id'), ('b', 'b-id'), ('d', 'a-id'), ('b/c', 'c-id')],
106
106
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
118
118
        # __iter__ has no strongly defined order
119
119
        self.assertEqual(
120
120
            set(['root-id', 'a-id', 'b-id', 'c-id']),
121
 
            set(iter(tree)))
 
121
            set(tree.all_file_ids()))
122
122
        self.assertEqual(
123
123
            [('', 'root-id'), ('b', 'b-id'), ('d', 'a-id'), ('b/c', 'c-id')],
124
124
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
136
136
        # __iter__ has no strongly defined order
137
137
        self.assertEqual(
138
138
            set(['root-id', 'a-id', 'b-id', 'c-id']),
139
 
            set(iter(tree)))
 
139
            set(tree.all_file_ids()))
140
140
        self.assertEqual(
141
141
            [('', 'root-id'), ('a', 'a-id'), ('b', 'b-id'), ('e', 'c-id')],
142
142
            [(path, node.file_id) for path, node in tree.iter_entries_by_dir()])
165
165
                 u'0utf\u1234file'.encode('utf8'),
166
166
                'symlink',
167
167
                 ]),
168
 
            set(iter(tree)))
 
168
            set(tree.all_file_ids()))
169
169
        # note that the order of the paths and fileids is deliberately
170
170
        # mismatched to ensure that the result order is path based.
171
171
        self.assertEqual(
198
198
                '0dir-in-1topdir',
199
199
                 u'0utf\u1234file'.encode('utf8'),
200
200
                 ]),
201
 
            set(iter(tree)))
 
201
            set(tree.all_file_ids()))
202
202
        # note that the order of the paths and fileids is deliberately
203
203
        # mismatched to ensure that the result order is path based.
204
204
        self.assertEqual(