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

Method _exclude_packages

web/pgadmin/utils/route.py:116–131  ·  view source on GitHub ↗

This function check for server mode test cases. :param all_modules: all modules. :param exclude_pkgs: exclude package list.

(all_modules, exclude_pkgs)

Source from the content-addressed store, hash-verified

114
115 @staticmethod
116 def _exclude_packages(all_modules, exclude_pkgs):
117 """
118 This function check for server mode test cases.
119 :param all_modules: all modules.
120 :param exclude_pkgs: exclude package list.
121 """
122 for module_name in all_modules:
123 try:
124 if "tests." in str(module_name) and not any(
125 str(module_name).startswith(
126 'pgadmin.' + str(exclude_pkg)
127 ) for exclude_pkg in exclude_pkgs
128 ):
129 import_module(module_name)
130 except ImportError:
131 traceback.print_exc(file=sys.stderr)
132
133
134class BaseTestGenerator(unittest.TestCase, metaclass=TestsGeneratorRegistry):

Callers 1

load_generatorsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected