Ejemplo n.º 1
0
    def __init__(self,
                 *modules: ModuleAssembly,
                 agg_checks: Iterable[IsAggregationType] = (),
                 follow_imports: bool = True):
        self.app = Application()

        if follow_imports:
            self._solver = RecursiveModuleAssemblySolver()
        else:
            self._solver = StrictModuleAssemblySolver()
        self._global_registry = GlobalRegistry()
        self._agg_registry = AggRegistry()
        self._agg_registry.include_globals(agg_checks)
        self._modules = modules

        self._init()
Ejemplo n.º 2
0
 def cyclic_dependency_app(self) -> Application:
     return Application(modules={self.a_module, self.b_cd_module}, )
Ejemplo n.º 3
0
 def bootstrap_app(self) -> Application:
     return Application(
         modules={self.b_bs_module, self.a_module, self.c_bs_module}, )
Ejemplo n.º 4
0
 def missing_assignment_app(self) -> Application:
     return Application(modules={self.a_ma_module, self.b_ma_module}, )
Ejemplo n.º 5
0
 def missing_import_app(self) -> Application:
     return Application(modules={self.b_module}, )
Ejemplo n.º 6
0
 def cyclic_import_app(self) -> Application:
     return Application(modules={*self.a_b_ci_modules}, )
Ejemplo n.º 7
0
 def inconsistent_app(self):
     return Application(modules={self.inconsistent_module}, )
Ejemplo n.º 8
0
 def valid_app(self) -> Application:
     return Application(
         modules={self.c_module, self.b_module, self.a_module}, )