~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-01-12 03:53:21 UTC
  • mfrom: (4948 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4964.
  • Revision ID: andrew.bennetts@canonical.com-20100112035321-hofpz5p10224ryj3
Merge lp:bzr, resolving conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
 
 
17
 
"""Tests for the test trees used by the tree_implementations tests."""
18
 
 
19
 
from bzrlib.tests import SymlinkFeature
20
 
from bzrlib.tests.tree_implementations import TestCaseWithTree
21
 
 
22
 
 
23
 
class TestTreeShapes(TestCaseWithTree):
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
16
 
 
17
"""Tests for the test trees used by the per_tree tests."""
 
18
 
 
19
from bzrlib import tests
 
20
from bzrlib.tests import per_tree
 
21
 
 
22
 
 
23
class TestTreeShapes(per_tree.TestCaseWithTree):
24
24
 
25
25
    def test_empty_tree_no_parents(self):
26
26
        tree = self.make_branch_and_tree('.')
147
147
        # currently this test tree requires unicode. It might be good
148
148
        # to have it simply stop having the single unicode file in it
149
149
        # when dealing with a non-unicode filesystem.
150
 
        self.requireFeature(SymlinkFeature)
 
150
        self.requireFeature(tests.SymlinkFeature)
151
151
        tree = self.get_tree_with_subdirs_and_all_content_types()
152
152
        tree.lock_read()
153
153
        self.addCleanup(tree.unlock)
166
166
                'symlink',
167
167
                 ]),
168
168
            set(iter(tree)))
169
 
        # note that the order of the paths and fileids is deliberately 
 
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(
172
172
            [('', tree_root, 'directory'),
199
199
                 u'0utf\u1234file'.encode('utf8'),
200
200
                 ]),
201
201
            set(iter(tree)))
202
 
        # note that the order of the paths and fileids is deliberately 
 
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(
205
205
            [('', tree_root, 'directory'),