~bzr/bzr/bzr.1.5

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-08 23:03:13 UTC
  • mfrom: (3394.3.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20080508230313-knn3ibom6wt27w5k
(vila) Make the test suite use the new test loader

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
                          adapt_modules,
37
37
                          default_transport,
38
38
                          TestCaseWithTransport,
39
 
                          TestLoader,
40
39
                          TestSkipped,
41
 
                          TestSuite,
42
40
                          )
43
41
from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
44
42
from bzrlib.tests.workingtree_implementations import (
343
341
        return name, scenario_options
344
342
 
345
343
 
346
 
def test_suite():
347
 
    result = TestSuite()
 
344
def load_tests(basic_tests, module, loader):
 
345
    result = loader.suiteClass()
 
346
    # add the tests for this module
 
347
    result.addTests(basic_tests)
 
348
 
348
349
    test_tree_implementations = [
349
350
        'bzrlib.tests.tree_implementations.test_annotate_iter',
350
351
        'bzrlib.tests.tree_implementations.test_get_file_mtime',
358
359
        'bzrlib.tests.tree_implementations.test_tree',
359
360
        'bzrlib.tests.tree_implementations.test_walkdirs',
360
361
        ]
 
362
 
361
363
    adapter = TreeTestProviderAdapter(
362
364
        default_transport,
363
365
        # None here will cause a readonly decorator to be created
364
366
        # by the TestCaseWithTransport.get_readonly_transport method.
365
367
        None,
366
 
        [(format, format._matchingbzrdir) for format in 
 
368
        [(format, format._matchingbzrdir) for format in
367
369
         WorkingTreeFormat._formats.values() + _legacy_formats])
368
 
    loader = TestLoader()
 
370
 
 
371
    # add the tests for the sub modules
369
372
    adapt_modules(test_tree_implementations, adapter, loader, result)
370
 
    result.addTests(loader.loadTestsFromModuleNames(['bzrlib.tests.tree_implementations']))
371
373
    return result