예제 #1
0
 def test_main_calculation_does_not_happen_if_location_secondary_shelf(
         self):
     probe_group, matches, scene = self.create_scene_scif_matches_stitch_groups_data_mocks(
         DataTestUnitPEPSICOUK.test_case_1, 3)
     scene_tb = PEPSICOUKSceneToolBox(self.data_provider_mock, self.output)
     scene_tb.main_function()
     self.assertTrue(scene_tb.kpi_results.empty)
예제 #2
0
class SceneGenerator:
    def __init__(self, data_provider, output=None):
        self.data_provider = data_provider
        self.output = output
        self.project_name = data_provider.project_name
        self.session_uid = self.data_provider.session_uid
        self.common = Common(data_provider)
        self.scene_tool_box = PEPSICOUKSceneToolBox(self.data_provider,
                                                    self.output, self.common)

    @log_runtime('Total Calculations', log_start=True)
    def scene_score(self):
        if self.scene_tool_box.match_product_in_scene.empty:
            Log.warning('Match product in scene is empty for this scene')
        else:
            self.scene_tool_box.main_function()
            self.scene_tool_box.common.commit_results_data(
                result_entity='scene')