Skip to content

Commit

Permalink
Tests: Add check mocha.run() using fbp-python-example runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnor committed Apr 21, 2015
1 parent eb0a1e1 commit 16df036
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "protocol-examples"]
path = protocol-examples
url = ../protocol-examples.git
27 changes: 27 additions & 0 deletions examples/simple-passing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Simple example of passing tests"
topic: "core/Repeat"
fixture:
type: 'fbp'
data: |
# @runtime python-example
INPORT=it.IN:IN
INPORT=it.OUT:OUT
it(core/Repeat) OUT -> IN f(core/Repeat)
cases:
-
name: 'sending a boolean'
assertion: 'should repeat the same'
inputs:
in: true
expect:
out: true
-
name: 'sending a numbe'
assertion: 'should repeat the same'
inputs:
in: 1000
expect:
out: 1000
1 change: 1 addition & 0 deletions protocol-examples
Submodule protocol-examples added at e635c9
14 changes: 14 additions & 0 deletions spec/mocha.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fbpspec = require '..'

rt =
label: "Example runtime"
description: "Simple Python example FBP runtime"
type: "fbp-python-example"
protocol: "websocket"
address: "ws://localhost:3569"
secret: "py3k"
id: "2ef763ff-1f28-49b8-b58f-5c6a5c23af26"
user: "3f3a8187-0931-4611-8963-239c0dff1939"
command: 'python2 protocol-examples/python/runtime.py'

fbpspec.mocha.run rt, './examples/simple-passing.yaml', {}

0 comments on commit 16df036

Please sign in to comment.