示例#1
0
 def test_iter(self):
     modules = list(iterload('plugins'))
     self.assertEqual(len(modules), 2)
     self.assertTrue('plugins' in pool, pool)
     self.assertEqual(len(pool['plugins']), 2, pool)
     self.assertEqual(sorted(pool['plugins']),
                      sorted(['everything', 'plugin']))
示例#2
0
def _reset(replacer):
    modules = []
    for module in iterload('searchreplace'):
        modules.append(module.__name__)
    for module in modules:
        del sys.modules[module]
    replacer._discovered = False
    replacer.models = {}
示例#3
0
def _reset(replacer):
    modules = []
    for module in iterload('searchreplace'):
        modules.append(module.__name__)
    for module in modules:
        del sys.modules[module]
    replacer._discovered = False
    replacer.models = {}
示例#4
0
 def test_iter(self):
     modules = list(iterload('plugins'))
     self.assertEqual(len(modules), 2)
     self.assertTrue('plugins' in pool, pool)
     self.assertEqual(len(pool['plugins']), 2, pool)
     self.assertEqual(sorted(pool['plugins']), sorted(['everything', 'plugin']))