コード例 #1
0
    def setUp(self):
        self.taskstring = ""
        self.task = []
        self.range_spec = (0,1,100)
        self.ref_task_json = \
        """
{"class_name": "extraction_test_topblock", "module_name": "mtb", "instruction": "run_fg", "sinks": ["blocks_vector_sink_x_0"], "attributes": {"length": {"value_type": "float64", "param_type": "LIST", "value": [1.0, 10.0, 100.0, 1000.0]}, "value": {"value_type": "float64", "param_type": "LIN_RANGE", "value": [1.0, 10.0, 100.0]}}}
        """
        self.task = bt.task.load(self.ref_task_json)
        self.ra = remote_agent.remote_agent()
コード例 #2
0
    def setUp(self):
        self.taskstring = ""
        self.task = []
        self.range_spec = (0,1,100)
        self.ref_task_json = \
        """
{"class_name": "extraction_test_topblock", "module_name": "mtb", "instruction": "run_fg", "sinks": ["blocks_vector_sink_x_0"], "attributes": {"length": {"value_type": "float64", "param_type": "LIST", "value": [1.0, 10.0, 100.0, 1000.0]}, "value": {"value_type": "float64", "param_type": "LIN_RANGE", "value": [1.0, 10.0, 100.0]}}}
        """
        self.task = bt.task.load(self.ref_task_json)
        self.ra = remote_agent.remote_agent()
        self.tempdir = tempfile.mkdtemp("results")
        tempstore = open(os.path.join(self.tempdir, "result.json"), "w")
        results = self.ra.execute_all(self.task, tempstore)
        tempstore.close()
        self.rc1 = result_comprehension()
        self.rc1.load_directory(self.tempdir)