~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: 2008-02-25 09:21:19 UTC
  • mfrom: (3235.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080225092119-bk1won32t9nw4h6u
Merge 1.2 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
2816
2816
        suite.addTest(doc_suite)
2817
2817
 
2818
2818
    default_encoding = sys.getdefaultencoding()
2819
 
    for name, plugin in  [(n, p) for (n, p) in bzrlib.plugin.plugins().items()
2820
 
                          if (keep_only is None
2821
 
                              or id_filter.is_module_name_used(
2822
 
                p.module.__name__))]:
2823
 
        try:
2824
 
            plugin_suite = plugin.test_suite()
2825
 
        except ImportError, e:
2826
 
            bzrlib.trace.warning(
2827
 
                'Unable to test plugin "%s": %s', name, e)
2828
 
        else:
2829
 
            if plugin_suite is not None:
2830
 
                if keep_only is not None:
2831
 
                    plugin_suite = filter_suite_by_id_list(plugin_suite,
2832
 
                                                           id_filter)
2833
 
                suite.addTest(plugin_suite)
 
2819
    for name, plugin in bzrlib.plugin.plugins().items():
 
2820
        if keep_only is not None:
 
2821
            if not id_filter.is_module_name_used(plugin.module.__name__):
 
2822
                continue
 
2823
        plugin_suite = plugin.test_suite()
 
2824
        # We used to catch ImportError here and turn it into just a warning,
 
2825
        # but really if you don't have --no-plugins this should be a failure.
 
2826
        # mbp 20080213 - see http://bugs.launchpad.net/bugs/189771
 
2827
        if plugin_suite is not None:
 
2828
            if keep_only is not None:
 
2829
                plugin_suite = filter_suite_by_id_list(plugin_suite,
 
2830
                                                       id_filter)
 
2831
            suite.addTest(plugin_suite)
2834
2832
        if default_encoding != sys.getdefaultencoding():
2835
2833
            bzrlib.trace.warning(
2836
2834
                'Plugin "%s" tried to reset default encoding to: %s', name,