MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / load_modules

Function load_modules

web/regression/runtests.py:315–354  ·  view source on GitHub ↗

Method returns list of modules which is formed by removing packages from exclude_pkgs arguments. :param arguments: :param exclude_pkgs: :return:

(arguments, exclude_pkgs)

Source from the content-addressed store, hash-verified

313
314
315def load_modules(arguments, exclude_pkgs):
316 """
317 Method returns list of modules which is formed by removing packages from
318 exclude_pkgs arguments.
319 :param arguments:
320 :param exclude_pkgs:
321 :return:
322 """
323 from pgadmin.utils.route import TestsGeneratorRegistry
324 # Load the test modules which are in given package(i.e. in arguments.pkg)
325 for_modules = []
326 if arguments['modules'] is not None:
327 for_modules = arguments['modules'].split(',')
328
329 if arguments['pkg'] is None or arguments['pkg'] == "all":
330 TestsGeneratorRegistry.load_generators(arguments['pkg'],
331 'pgadmin', exclude_pkgs)
332 elif arguments['pkg'] is not None and arguments['pkg'] == "resql":
333 # Load the reverse engineering sql test module
334 TestsGeneratorRegistry.load_generators(arguments['pkg'],
335 'pgadmin', exclude_pkgs,
336 for_modules, is_resql_only=True)
337 elif arguments['pkg'] is not None and arguments['pkg'] == "feature_tests":
338 # Load the feature test module
339 TestsGeneratorRegistry.load_generators(arguments['pkg'],
340 'regression.%s' %
341 arguments['pkg'],
342 exclude_pkgs,
343 for_modules)
344 else:
345 TestsGeneratorRegistry.load_generators(arguments['pkg'],
346 'pgadmin.%s' %
347 arguments['pkg'],
348 exclude_pkgs,
349 for_modules)
350
351 # Sort module list so that test suite executes the test cases sequentially
352 module_list = TestsGeneratorRegistry.registry.items()
353 module_list = sorted(module_list, key=lambda module_tuple: module_tuple[0])
354 return module_list
355
356
357def add_arguments():

Callers 1

get_test_modulesFunction · 0.70

Calls 1

load_generatorsMethod · 0.80

Tested by

no test coverage detected