예제 #1
0
파일: execute.py 프로젝트: sl33k/versuchung
 def before_experiment_run(self, parameter_type):
     if parameter_type == "output":
         CSV_File.before_experiment_run(self, "output")
         self.event_file = CSV_File(self.path + ".events")
         self.event_file.before_experiment_run("output")
         self.thread = thread.start_new_thread(self.monitor_thread, tuple())
예제 #2
0
파일: test.py 프로젝트: sl33k/versuchung
class CSVExperiment(Experiment):
    inputs = {}
    outputs = {"csv": CSV_File("csv_output")}

    def run(self):
        self.outputs.csv.value.append([1, 2, 3])
예제 #3
0
파일: execute.py 프로젝트: sl33k/versuchung
 def inp_extract_cmdline_parser(self, opts, args):
     CSV_File.inp_parser_extract(self, opts, None)
     self.event_file = CSV_File(self.path + ".events")
예제 #4
0
파일: test.py 프로젝트: sl33k/versuchung
from __future__ import print_function

from versuchung.experiment import Experiment
from versuchung.files import CSV_File


class CSVExperiment(Experiment):
    inputs = {}
    outputs = {"csv": CSV_File("csv_output")}

    def run(self):
        self.outputs.csv.value.append([1, 2, 3])


if __name__ == "__main__":
    import shutil, sys
    experiment = CSVExperiment()
    dirname = experiment(sys.argv)

    csv = CSV_File(dirname + "/" + "csv_output")

    assert csv.value == [["1", "2", "3"]]

    if dirname:
        shutil.rmtree(dirname)
    print("success")