def run_suite(self, suite, **kwargs): if hasattr(settings, "TEST_RUNNER" ) and "NoseTestSuiteRunner" in settings.TEST_RUNNER: from django_nose.plugin import DjangoSetUpPlugin, ResultPlugin from django_nose.runner import _get_plugins_from_settings from nose.config import Config import nose result_plugin = ResultPlugin() plugins_to_add = [DjangoSetUpPlugin(self), result_plugin] config = Config(plugins=nose.core.DefaultPluginManager()) config.plugins.addPlugins(extraplugins=plugins_to_add) for plugin in _get_plugins_from_settings(): plugins_to_add.append(plugin) nose.core.TestProgram(argv=suite, exit=False, addplugins=plugins_to_add, testRunner=TeamcityNoseRunner(config=config)) return result_plugin.result else: self.options.update(kwargs) return TeamcityTestRunner.run(self, suite, **self.options)
def run_suite(self, suite, **kwargs): if hasattr(settings, "TEST_RUNNER" ) and "NoseTestSuiteRunner" in settings.TEST_RUNNER: from django_nose.plugin import DjangoSetUpPlugin, ResultPlugin from django_nose.runner import _get_plugins_from_settings from nose.plugins.manager import PluginManager from nose.config import Config import nose config = Config(plugins=PluginManager()) config.plugins.loadPlugins() result_plugin = ResultPlugin() config.plugins.addPlugin(DjangoSetUpPlugin(self)) config.plugins.addPlugin(result_plugin) for plugin in _get_plugins_from_settings(): config.plugins.addPlugin(plugin) nose.core.TestProgram(argv=suite, exit=False, testRunner=TeamcityNoseRunner(config=config)) return result_plugin.result else: return TeamcityTestRunner.run(self, suite, **kwargs)