diff options
| author | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-10-07 11:56:26 -0700 |
|---|---|---|
| committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2015-11-20 21:16:42 +0000 |
| commit | 0b034d611f56d8d6d855cf147caeb3d0f8d6068f (patch) | |
| tree | 787dfe03faa09d87f54eecd357f886c691350288 /taskflow/tests/unit/action_engine/test_compile.py | |
| parent | 010b3fda2125dd9fe10e8ee8cfd5aba35575c43a (diff) | |
| download | taskflow-0b034d611f56d8d6d855cf147caeb3d0f8d6068f.tar.gz | |
Move validation of compiled unit out of compiler1.25.0
Instead of having the compiler do any validation on the
graph it has created instead have the compiler just compile
and have the engine that uses that compiled result do any
post compilation validation instead.
This makes it more clear that the compiler just compiles a
flow (and tasks and nested flows) into a graph, and that is
all that it does.
Change-Id: I96a35d732dc2be9fc8bc8dc6466256a19ac2df6d
Diffstat (limited to 'taskflow/tests/unit/action_engine/test_compile.py')
| -rw-r--r-- | taskflow/tests/unit/action_engine/test_compile.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/taskflow/tests/unit/action_engine/test_compile.py b/taskflow/tests/unit/action_engine/test_compile.py index e8d0126..6ccf358 100644 --- a/taskflow/tests/unit/action_engine/test_compile.py +++ b/taskflow/tests/unit/action_engine/test_compile.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License. +from taskflow import engines from taskflow.engines.action_engine import compiler from taskflow import exceptions as exc from taskflow.patterns import graph_flow as gf @@ -399,17 +400,19 @@ class PatternCompileTest(test.TestCase): test_utils.DummyTask(name="a"), test_utils.DummyTask(name="a") ) + e = engines.load(flo) self.assertRaisesRegexp(exc.Duplicate, '^Atoms with duplicate names', - compiler.PatternCompiler(flo).compile) + e.compile) def test_checks_for_dups_globally(self): flo = gf.Flow("test").add( gf.Flow("int1").add(test_utils.DummyTask(name="a")), gf.Flow("int2").add(test_utils.DummyTask(name="a"))) + e = engines.load(flo) self.assertRaisesRegexp(exc.Duplicate, '^Atoms with duplicate names', - compiler.PatternCompiler(flo).compile) + e.compile) def test_retry_in_linear_flow(self): flo = lf.Flow("test", retry.AlwaysRevert("c")) |
