diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py index a0b766b5d4ab..e9b969e520b0 100644 --- a/lib/matplotlib/__init__.py +++ b/lib/matplotlib/__init__.py @@ -1247,6 +1247,7 @@ def test(verbosity=1): import nose.plugins.builtin from .testing.noseclasses import KnownFailure from nose.plugins.manager import PluginManager + from nose.plugins import multiprocess # store the old values before overriding plugins = [] @@ -1256,6 +1257,11 @@ def test(verbosity=1): manager = PluginManager(plugins=plugins) config = nose.config.Config(verbosity=verbosity, plugins=manager) + # Nose doesn't automatically instantiate all of the plugins in the + # child processes, so we have to provide the multiprocess plugin with + # a list. + multiprocess._instantiate_plugins = [KnownFailure] + success = nose.run( defaultTest=default_test_modules, config=config, ) diff --git a/setup.py b/setup.py index 5f1b561eb0d2..fd5a7a38941a 100644 --- a/setup.py +++ b/setup.py @@ -229,10 +229,4 @@ # check for zip safety. zip_safe=False, - # Install our nose plugin so it will always be found - entry_points={ - 'nose.plugins.0.10': [ - 'KnownFailure = matplotlib.testing.noseclasses:KnownFailure' - ] - }, ) diff --git a/tests.py b/tests.py index 344210e20b25..a78c9bb2b194 100755 --- a/tests.py +++ b/tests.py @@ -22,8 +22,16 @@ while not os.path.exists(font_manager._fmcache): time.sleep(0.5) +plugins = [KnownFailure] + +# Nose doesn't automatically instantiate all of the plugins in the +# child processes, so we have to provide the multiprocess plugin with +# a list. +from nose.plugins import multiprocess +multiprocess._instantiate_plugins = plugins + def run(): - nose.main(addplugins=[KnownFailure()], + nose.main(addplugins=[x() for x in plugins], defaultTest=default_test_modules) if __name__ == '__main__':