Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
workflow
pypushflow
Commits
9054ef4d
Commit
9054ef4d
authored
Aug 04, 2020
by
payno
Browse files
[CI] fix some unit test since channel is passed
parent
5333a99a
Changes
2
Hide whitespace changes
Inline
Side-by-side
pypushflow/test/test_Actors.py
View file @
9054ef4d
...
...
@@ -49,9 +49,9 @@ class TestPythonActor(unittest.TestCase):
'name'
:
'Ragnar'
}
actor
.
connect
(
stopActor
)
actor
.
trigger
(
inData
)
actor
.
trigger
(
(
None
,
inData
)
)
stopActor
.
join
(
timeout
=
10
)
out_data
=
stopActor
.
out_data
out_channel
,
out_data
=
stopActor
.
out_data
self
.
assertIsNotNone
(
out_data
)
self
.
assertEqual
(
out_data
[
'reply'
],
'Hello Ragnar!'
)
...
...
@@ -67,11 +67,12 @@ class TestPythonActor(unittest.TestCase):
actor
.
connect
(
stopActor
)
actor
.
connectOnError
(
errorHandler
)
errorHandler
.
connect
(
stopActor
)
actor
.
trigger
(
inData
)
actor
.
trigger
(
(
None
,
inData
)
)
stopActor
.
join
(
timeout
=
5
)
out_data
=
stopActor
.
out_data
out_channel
,
out_data
=
stopActor
.
out_data
self
.
assertIsNotNone
(
out_data
)
self
.
assertTrue
(
'WorkflowException'
in
out_data
)
self
.
assertEqual
(
out_channel
,
None
)
def
test_ForkAndJoinActors
(
self
):
start
=
StartActor
()
...
...
@@ -91,9 +92,9 @@ class TestPythonActor(unittest.TestCase):
joinActor
.
connect
(
stop
)
# Run
inData
=
{
'a'
:
1
}
start
.
trigger
(
inData
)
start
.
trigger
(
(
None
,
inData
)
)
stop
.
join
(
timeout
=
5
)
out_data
=
stop
.
out_data
out_channel
,
out_data
=
stop
.
out_data
self
.
assertIsNotNone
(
out_data
)
logger
.
info
(
out_data
)
...
...
pypushflow/test/test_representation.py
View file @
9054ef4d
...
...
@@ -68,7 +68,7 @@ class TestScheme(unittest.TestCase):
def
testProcessing
(
self
):
processable_workflow
=
ProcessableWorkflow
(
scheme
=
self
.
scheme
)
out_
=
exec_
(
scheme
=
processable_workflow
,
input_
=
{
'data'
:
0
,})
channel_out
,
out_
=
exec_
(
scheme
=
processable_workflow
,
input_
=
(
None
,
{
'data'
:
0
,})
)
self
.
assertEqual
(
out_
[
'data'
],
7
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment