From 00f52639673dc4db32ac9302e2a70483492d621e Mon Sep 17 00:00:00 2001 From: J08nY Date: Tue, 4 Jul 2017 21:18:23 +0200 Subject: Instantiate components only in add_components, not at lower levels. - The scan_module and find_components functions are also useful when they don't instantiate the components they load, and instantiation is left to add_components. --- src/mailman/utilities/tests/test_modules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mailman/utilities/tests/test_modules.py') diff --git a/src/mailman/utilities/tests/test_modules.py b/src/mailman/utilities/tests/test_modules.py index 82d44cff4..08ec3848a 100644 --- a/src/mailman/utilities/tests/test_modules.py +++ b/src/mailman/utilities/tests/test_modules.py @@ -99,8 +99,8 @@ class BadStyle: in find_components('mypackage', IStyle)] self.assertEqual(names, ['good-style']) - def test_find_components_no_instantiate(self): - # find_components() now instantiates the class unless it's been + def test_find_components_abstract_component(self): + # find_components() finds the class unless it's been # decorated with the @abstract_component decorator. with ExitStack() as resources: # Creating a temporary directory and adding it to sys.path. -- cgit v1.2.3-70-g09d2