~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev, update to use new hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    )
38
38
from bzrlib.revisiontree import RevisionTree
39
39
from bzrlib.transform import TransformPreview
 
40
from bzrlib.tests import (
 
41
    features,
 
42
    )
40
43
from bzrlib.workingtree import (
41
 
    WorkingTreeFormat,
42
 
    _legacy_formats,
 
44
    format_registry,
43
45
    )
44
46
from bzrlib.workingtree_4 import (
45
47
    DirStateRevisionTree,
243
245
        note that the order of the paths and fileids is deliberately
244
246
        mismatched to ensure that the result order is path based.
245
247
        """
246
 
        self.requireFeature(tests.UnicodeFilenameFeature)
 
248
        self.requireFeature(features.UnicodeFilenameFeature)
247
249
        tree = self.make_branch_and_tree('.')
248
250
        paths = ['0file',
249
251
            '1top-dir/',
275
277
 
276
278
    def _create_tree_with_utf8(self, tree):
277
279
        """Generate a tree with a utf8 revision and unicode paths."""
278
 
        self.requireFeature(tests.UnicodeFilenameFeature)
 
280
        self.requireFeature(features.UnicodeFilenameFeature)
279
281
        # We avoid combining characters in file names here, normalization
280
282
        # checks (as performed by some file systems (OSX) are outside the scope
281
283
        # of these tests).  We use the euro sign \N{Euro Sign} or \u20ac in
333
335
        # for working tree format tests, preserve the tree
334
336
        scenario[1]["_workingtree_to_test_tree"] = return_parameter
335
337
    # add RevisionTree scenario
336
 
    workingtree_format = WorkingTreeFormat._default_format
 
338
    workingtree_format = format_registry.get_default()
337
339
    scenarios.append((RevisionTree.__name__,
338
340
        create_tree_scenario(transport_server, transport_readonly_server,
339
341
        workingtree_format, revision_tree_from_workingtree,)))
375
377
def load_tests(standard_tests, module, loader):
376
378
    per_tree_mod_names = [
377
379
        'annotate_iter',
 
380
        'export',
378
381
        'get_file_mtime',
379
382
        'get_file_with_stat',
380
383
        'get_root_id',
381
384
        'get_symlink_target',
382
385
        'inv',
383
386
        'iter_search_rules',
 
387
        'is_executable',
384
388
        'list_files',
385
389
        'locking',
386
390
        'path_content_summary',
397
401
        # None here will cause a readonly decorator to be created
398
402
        # by the TestCaseWithTransport.get_readonly_transport method.
399
403
        None,
400
 
        WorkingTreeFormat._formats.values() + _legacy_formats)
 
404
        format_registry._get_all())
401
405
    # add the tests for the sub modules
402
406
    return tests.multiply_tests(submod_tests, scenarios, standard_tests)