Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d53e6b2

Browse files
committed
Merge pull request #2139 from mdboom/dont-install-nose-plugin
Don't install the nose KnownFailure plugin as a pkg_resources entry_point
2 parents 0b1c33a + 3a0d666 commit d53e6b2

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

lib/matplotlib/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,6 +1247,7 @@ def test(verbosity=1):
12471247
import nose.plugins.builtin
12481248
from .testing.noseclasses import KnownFailure
12491249
from nose.plugins.manager import PluginManager
1250+
from nose.plugins import multiprocess
12501251

12511252
# store the old values before overriding
12521253
plugins = []
@@ -1256,6 +1257,11 @@ def test(verbosity=1):
12561257
manager = PluginManager(plugins=plugins)
12571258
config = nose.config.Config(verbosity=verbosity, plugins=manager)
12581259

1260+
# Nose doesn't automatically instantiate all of the plugins in the
1261+
# child processes, so we have to provide the multiprocess plugin with
1262+
# a list.
1263+
multiprocess._instantiate_plugins = [KnownFailure]
1264+
12591265
success = nose.run( defaultTest=default_test_modules,
12601266
config=config,
12611267
)

setup.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,10 +229,4 @@
229229
# check for zip safety.
230230
zip_safe=False,
231231

232-
# Install our nose plugin so it will always be found
233-
entry_points={
234-
'nose.plugins.0.10': [
235-
'KnownFailure = matplotlib.testing.noseclasses:KnownFailure'
236-
]
237-
},
238232
)

tests.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@
2222
while not os.path.exists(font_manager._fmcache):
2323
time.sleep(0.5)
2424

25+
plugins = [KnownFailure]
26+
27+
# Nose doesn't automatically instantiate all of the plugins in the
28+
# child processes, so we have to provide the multiprocess plugin with
29+
# a list.
30+
from nose.plugins import multiprocess
31+
multiprocess._instantiate_plugins = plugins
32+
2533
def run():
26-
nose.main(addplugins=[KnownFailure()],
34+
nose.main(addplugins=[x() for x in plugins],
2735
defaultTest=default_test_modules)
2836

2937
if __name__ == '__main__':

0 commit comments

Comments
 (0)