Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
team-simpy
simpy
Commits
a4493367
Commit
a4493367
authored
Sep 02, 2013
by
Ontje Lünsdorf
Browse files
Added an additional test for triggered events.
parent
7a4934c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
simpy/test/test_single_process.py
simpy/test/test_single_process.py
+14
-0
No files found.
simpy/test/test_single_process.py
View file @
a4493367
...
...
@@ -246,3 +246,17 @@ def test_triggered_event(env):
assert
result
==
'i was already done'
def
test_triggered_timeout
(
env
):
def
process
(
env
):
def
child
(
env
,
event
):
value
=
yield
event
env
.
exit
(
value
)
event
=
env
.
timeout
(
1
,
'i was already done'
)
# Start the child after the timeout has already happened.
yield
env
.
timeout
(
2
)
value
=
yield
env
.
process
(
child
(
env
,
event
))
assert
value
==
'i was already done'
env
.
run
(
env
.
start
(
process
(
env
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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