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

Skip to content

Commit 3259ff0

Browse files
committed
removes extra plugin calls
When we gather the plugins, we go through two list comprehensions, but call them each time. So on the second pass, the plugins that were called the first time can't be called again. This change makes it so that all fo the plugins are called together in the second list comprehension.
1 parent 0834f7e commit 3259ff0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ def test(verbosity=1, coverage=False):
15501550

15511551
# store the old values before overriding
15521552
plugins = _get_extra_test_plugins()
1553-
plugins.extend([plugin() for plugin in nose.plugins.builtin.plugins])
1553+
plugins.extend([plugin for plugin in nose.plugins.builtin.plugins])
15541554

15551555
manager = PluginManager(plugins=[x() for x in plugins])
15561556
config = nose.config.Config(verbosity=verbosity, plugins=manager)

0 commit comments

Comments
 (0)