Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't install the nose KnownFailure plugin as a pkg_resources entry_point #2139

Merged
merged 2 commits into from Jun 21, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/matplotlib/__init__.py
Expand Up @@ -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 = []
Expand All @@ -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,
)
Expand Down
6 changes: 0 additions & 6 deletions setup.py
Expand Up @@ -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'
]
},
)
10 changes: 9 additions & 1 deletion tests.py
Expand Up @@ -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__':
Expand Down