def test_it_initilizes_the_mlp_manager_factory(self, Locator: MagicMock, MLPF: MagicMock): self.__fullfillDepenendcies(Locator) MLPE = MagicMock(spec=MLP) MLPF.return_value = MLPE Services.startServices() MLPF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("mlp", MLPE, Dependencies="properties")
def test_it_initilizes_the_properties_mananger(self, Locator: MagicMock, M: MagicMock): self.__fullfillDepenendcies(Locator) PM = PropertiesManager() M.return_value = PM Services.startServices() M.assert_called_once() Locator.set.assert_any_call("properties", PM)
def test_it_initilizes_the_complex_normalizer(self, Locator: MagicMock, CN: MagicMock): self.__fullfillDepenendcies(Locator) Norm = MagicMock(spec=NormalizerFactory) CN.return_value = Norm Services.startServices() CN.assert_called_once() Locator.set.assert_any_call("preprocessor.normalizer.complex", Norm)
def test_it_initilizes_the_facility_mananger(self, Locator: MagicMock, FM: MagicMock): self.__fullfillDepenendcies(Locator) Facilitator = MagicMock(spec=FacilityManager) FM.return_value = Facilitator Services.startServices() FM.assert_called_once() Locator.set.assert_any_call("facilitymanager", Facilitator)
def test_it_initilizes_the_csv_file_writer(self, Locator: MagicMock, CFF: MagicMock): self.__fullfillDepenendcies(Locator) Writer = MagicMock(spec=FileWriter) CFF.return_value = Writer Services.startServices() CFF.assert_called_once() Locator.set.assert_any_call("evaluator.csv", Writer)
def test_it_initilizes_the_categories_encoder(self, Locator: MagicMock, CF: MagicMock): self.__fullfillDepenendcies(Locator) C = MagicMock(spec=CategoriesEncoder) CF.return_value = C Services.startServices() CF.assert_called_once() Locator.set.assert_any_call("categories", C)
def test_it_initilizes_the_shared_memory(self, Locator: MagicMock, SMC: MagicMock): self.__fullfillDepenendcies(Locator) SM = MagicMock(spec=Cache) SMC.return_value = SM Services.startServices() SMC.assert_called_once() Locator.set.assert_any_call("preprocessor.cache.shared", SM)
def test_it_initilizes_the_selector_manager_factory( self, Locator: MagicMock, SMF: MagicMock): self.__fullfillDepenendcies(Locator) SM = MagicMock(spec=Selector) SMF.return_value = SM Services.startServices() SMF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("vectorizer.selector", SM, Dependencies="properties")
def test_it_initilizes_the_measurer(self, Locator: MagicMock, MeF: MagicMock): self.__fullfillDepenendcies(Locator) Measure = MagicMock(spec=Measurer) MeF.return_value = Measure Services.startServices() MeF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("measurer", Measure, Dependencies="properties")
def test_it_initilizes_the_splitter(self, Locator: MagicMock, SpF: MagicMock): self.__fullfillDepenendcies(Locator) Split = MagicMock(spec=Splitter) SpF.return_value = Split Services.startServices() SpF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("splitter", Split, Dependencies="properties")
def test_it_initilizes_the_persitent_memory(self, Locator: MagicMock, NPC: MagicMock): self.__fullfillDepenendcies(Locator) SM = MagicMock(spec=Cache) NPC.return_value = SM Services.startServices() NPC.assert_called_once_with(Services.getService) Locator.set.assert_any_call("preprocessor.cache.persistent", SM, Dependencies="properties")
def test_it_initilizes_the_vectorizer_factory(self, Locator: MagicMock, VF: MagicMock): self.__fullfillDepenendcies(Locator) V = MagicMock(spec=Vectorizer) VF.return_value = V Services.startServices() VF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("vectorizer", V, Dependencies=[ "properties", "vectorizer.selector", ])
def pipe( self, Data: DataFrame, TestData: Union[ None, DataFrame ], ShortName: str, Description: str, Properties: dict = None ): Services.startServices() self.__reassign( Properties, Services.getService( 'properties', PropertiesManager ) ) self.__startMining( Data, TestData, ShortName, Description )
def test_it_initilizes_the_evaluator(self, Locator: MagicMock, EF: MagicMock): self.__fullfillDepenendcies(Locator) Eval = MagicMock(spec=Evaluator) EF.return_value = Eval Services.startServices() EF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("evaluator", Eval, Dependencies=[ "properties", "evaluator.simple", "evaluator.json", "evaluator.csv" ])
def test_it_initilizes_the_test_text_miner(self, Locator: MagicMock, TMCF: MagicMock): self.__fullfillDepenendcies(Locator) TMC = MagicMock(spec=Controller) TMCF.return_value = TMC Services.startServices() TMCF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("test.textminer", TMC, Dependencies=[ 'properties', 'categories', 'facilitymanager', 'splitter', 'preprocessor', 'vectorizer', 'mlp', 'evaluator' ])
def test_it_initilizes_the_preprocessor(self, Locator: MagicMock, PPF: MagicMock): self.__fullfillDepenendcies(Locator) PP = MagicMock(spec=Preprocessor) PPF.return_value = PP Services.startServices() PPF.assert_called_once_with(Services.getService) Locator.set.assert_any_call("preprocessor", PP, Dependencies=[ "properties", "preprocessor.normalizer.simple", "preprocessor.normalizer.complex", "preprocessor.cache.persistent", "preprocessor.cache.shared" ])