2496
2496
except ValueError, e:
2497
2497
print '**failed to get doctest for: %s\n%s' %(m,e)
2499
for name, plugin in bzrlib.plugin.all_plugins().items():
2500
if getattr(plugin, 'test_suite', None) is not None:
2501
default_encoding = sys.getdefaultencoding()
2503
plugin_suite = plugin.test_suite()
2504
except ImportError, e:
2505
bzrlib.trace.warning(
2506
'Unable to test plugin "%s": %s', name, e)
2499
default_encoding = sys.getdefaultencoding()
2500
for name, plugin in bzrlib.plugin.plugins().items():
2502
plugin_suite = plugin.test_suite()
2503
except ImportError, e:
2504
bzrlib.trace.warning(
2505
'Unable to test plugin "%s": %s', name, e)
2507
if plugin_suite is not None:
2508
2508
suite.addTest(plugin_suite)
2509
if default_encoding != sys.getdefaultencoding():
2510
bzrlib.trace.warning(
2511
'Plugin "%s" tried to reset default encoding to: %s', name,
2512
sys.getdefaultencoding())
2514
sys.setdefaultencoding(default_encoding)
2509
if default_encoding != sys.getdefaultencoding():
2510
bzrlib.trace.warning(
2511
'Plugin "%s" tried to reset default encoding to: %s', name,
2512
sys.getdefaultencoding())
2514
sys.setdefaultencoding(default_encoding)