def test_nonempty_pipeline2(self): gen_pconfig.start = 1 tasks = [routine1, routine2] p = Pipeline(gen_pconfig, tasks) assert_equal(p.level, 1) p.run_pipeline() assert_equal(p.level, 2) assert_equal(p.history[0][-1], "skipped")
def test_nonempty_pipeline3(self): gen_pconfig.start = 0 tasks = [routine1, routine2] p = Pipeline(gen_pconfig, tasks) assert_equal(p.level, 0) p() assert_equal(p.level, 2)
def test_nonempty_pipeline4(self): gen_pconfig.start = 0 gen_pconfig.end = 1 tasks = [routine1, routine2] p = Pipeline(gen_pconfig, tasks) assert_equal(p.end, 1) p() assert_equal(p.level, 1) assert_equal(len(p.history), 1)
def test_nonempty_pipeline(self): tasks = [routine1, routine2] p = Pipeline(gen_pconfig, tasks) p() assert_equal(p.level, 2) assert_equal(len(p.history), 2)
def test_empty_pipeline(self): gen_pconfig.loglevel = 'notset' p = Pipeline(gen_pconfig, []) ok_(p.start == 0) ok_(p.end == 1000)
def test_raises_typerror(self): p = Pipeline()
def test_notcallable(self): p = Pipeline(gen_pconfig, ["str"]) p()
def test_setlevel(self): p = Pipeline(gen_pconfig, []) p.level = 2
def test_picklable(self): if D: ok_(dill.pickles(Pipeline(gen_pconfig, [])))
def test_report_str(self): p = Pipeline(gen_pconfig, []) ok_(str(p))