예제 #1
0
 def test_read_(self):
     actual = read_from_config_files(
         [scenario_path("config_files", "test_config_reader.cfg")]
     )
     with config(actual):
         assert (
             config.get("test_config_reader", "test_config_reader") == "test_value"
         )
예제 #2
0
    def test_from_extra_config(self):
        class MyTaskWithConfg(TTask):
            parameter_with_config = parameter[str]

            def __init__(self, **kwargs):
                super(MyTaskWithConfg, self).__init__(**kwargs)

            def run(self):
                super(MyTaskWithConfg, self).run()
                assert self.parameter_with_config == "value_from_config"

        assert dbnd_run_cmd("MyTaskWithConfg --conf-file %s" %
                            scenario_path("config_files/test_cfg_switch.cfg"))
예제 #3
0
 def test_simple36_py(self):
     run_test_notebook(scenario_path("jupyter", "simple-py36.ipynb"))
예제 #4
0
 def band(self):
     count = WordCount(text=scenario_path("data/some_log.txt"))
     self.counter = count.counters
예제 #5
0
 def band(self):
     self.log = target(scenario_path("data/some_log.txt"))
예제 #6
0
 def test_pass_on_injected_format(self):
     task = TTextDataTask(text_data=target(
         scenario_path("data/some_unknown_ext.myext"), config=file.txt))
     assert_run_task(task)
예제 #7
0
 def test_unknown_format(self):
     task = TTextDataTask(
         text_data=scenario_path("data/some_unknown_ext.myext"))
     assert_run_task(task)