~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-22 20:17:22 UTC
  • mfrom: (3004.1.10 84043)
  • Revision ID: pqm@pqm.ubuntu.com-20071122201722-4l5bgljqn7qdux7f
commit now can invoke an external editor in a non-ascii directory.  (Watkins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
                          TestSuite,
95
95
                          TestLoader,
96
96
                          )
 
97
from bzrlib.tests.EncodingAdapter import EncodingTestAdapter
97
98
from bzrlib.tests.treeshape import build_tree_contents
98
99
from bzrlib.workingtree import WorkingTree, WorkingTreeFormat2
99
100
 
2511
2512
    from bzrlib.tests.test_transport_implementations import TransportTestProviderAdapter
2512
2513
    adapter = TransportTestProviderAdapter()
2513
2514
    adapt_modules(test_transport_implementations, adapter, loader, suite)
 
2515
    adapt_tests(
 
2516
        ["bzrlib.tests.test_msgeditor.MsgEditorTest."
 
2517
         "test__create_temp_file_with_commit_template_in_unicode_dir"],
 
2518
        EncodingTestAdapter(), loader, suite)
2514
2519
    for package in packages_to_test():
2515
2520
        suite.addTest(package.test_suite())
2516
2521
    for m in MODULES_TO_TEST:
2602
2607
        suite.addTests(adapter.adapt(test))
2603
2608
 
2604
2609
 
 
2610
def adapt_tests(tests_list, adapter, loader, suite):
 
2611
    """Adapt the tests in tests_list using adapter and add to suite."""
 
2612
    for test in tests_list:
 
2613
        suite.addTests(adapter.adapt(loader.loadTestsFromName(test)))
 
2614
 
 
2615
 
2605
2616
def _rmtree_temp_dir(dirname):
2606
2617
    # If LANG=C we probably have created some bogus paths
2607
2618
    # which rmtree(unicode) will fail to delete