Example #1
0
 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")
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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)
Example #5
0
 def test_empty_pipeline(self):
     gen_pconfig.loglevel = 'notset'
     p = Pipeline(gen_pconfig, [])
     ok_(p.start == 0)
     ok_(p.end == 1000)
Example #6
0
 def test_raises_typerror(self):
     p = Pipeline()
Example #7
0
 def test_notcallable(self):
     p = Pipeline(gen_pconfig, ["str"])
     p()
Example #8
0
 def test_setlevel(self):
     p = Pipeline(gen_pconfig, [])
     p.level = 2
Example #9
0
 def test_picklable(self):
     if D:
         ok_(dill.pickles(Pipeline(gen_pconfig, [])))
Example #10
0
 def test_report_str(self):
     p = Pipeline(gen_pconfig, [])
     ok_(str(p))