-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
625 additions
and
7 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17"> | ||
<diagram name="Página-1" id="H1gPgiuQNB48lIkSNIZe"> | ||
<mxGraphModel dx="880" dy="524" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0" /> | ||
<mxCell id="1" parent="0" /> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-1" value="" style="group" vertex="1" connectable="0" parent="1"> | ||
<mxGeometry x="340" y="220" width="163" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-2" value="<font style="font-size: 12px">Behavioral<br>Codelet</font>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=3;fillColor=#ffcc99;strokeColor=#36393d;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry x="15.49647887323944" width="132.00704225352115" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-3" value="<font style="font-size: 8px;">O</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry x="147.50352112676057" y="9.999999999999998" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-4" value="<font style="font-size: 8px;">A</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry x="147.50352112676057" y="34.99999999999999" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-5" value="<font style="font-size: 8px; line-height: 120%;">LI</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;verticalAlign=middle;spacing=0;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry y="9.999999999999998" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-6" value="<font style="font-size: 8px;">GI</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry y="34.99999999999999" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-7" value="<font style="font-size: 11px">Memory Object<br></font>" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#36393d;strokeWidth=2;fillColor=#ffff88;fontSize=8;align=center;verticalAlign=top;labelPosition=center;verticalLabelPosition=bottom;" vertex="1" parent="1"> | ||
<mxGeometry x="100" y="220" width="57" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-8" value="<font style="font-size: 11px">Memory Object<br></font>" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#36393d;strokeWidth=2;fillColor=#ffff88;fontSize=8;align=center;verticalAlign=top;labelPosition=center;verticalLabelPosition=bottom;" vertex="1" parent="1"> | ||
<mxGeometry x="50" y="390" width="57" height="60" as="geometry" /> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/24.7.17 Chrome/128.0.6613.36 Electron/32.0.1 Safari/537.36" version="24.7.17"> | ||
<diagram name="Página-1" id="H1gPgiuQNB48lIkSNIZe"> | ||
<mxGraphModel dx="607" dy="361" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0"> | ||
<root> | ||
<mxCell id="0" /> | ||
<mxCell id="1" parent="0" /> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-1" value="" style="group" vertex="1" connectable="0" parent="1"> | ||
<mxGeometry x="352" y="220" width="163" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-2" value="Average<div>Codelet</div>" style="rounded=1;whiteSpace=wrap;html=1;strokeWidth=3;fillColor=#ffcc99;strokeColor=#36393d;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry x="15.49647887323944" width="132.00704225352115" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-3" value="<font style="font-size: 8px;">O</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry x="147.50352112676057" y="9.999999999999998" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-4" value="<font style="font-size: 8px;">A</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry x="147.50352112676057" y="34.99999999999999" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-5" value="<font style="font-size: 8px; line-height: 120%;">LI</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;verticalAlign=middle;spacing=0;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry y="9.999999999999998" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-6" value="<font style="font-size: 8px;">GI</font>" style="whiteSpace=wrap;html=1;strokeWidth=2;fillColor=#ffcccc;strokeColor=#36393d;fontSize=8;" vertex="1" parent="j3rSS8qZvCsvwcYJBwNX-1"> | ||
<mxGeometry y="34.99999999999999" width="15.49647887323944" height="15" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="j3rSS8qZvCsvwcYJBwNX-7" target="j3rSS8qZvCsvwcYJBwNX-5"> | ||
<mxGeometry relative="1" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-7" value="<font style="font-size: 11px">Value</font>" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#36393d;strokeWidth=2;fillColor=#ffff88;fontSize=8;align=center;verticalAlign=top;labelPosition=center;verticalLabelPosition=bottom;" vertex="1" parent="1"> | ||
<mxGeometry x="160" y="207.5" width="57" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="j3rSS8qZvCsvwcYJBwNX-8" target="j3rSS8qZvCsvwcYJBwNX-5"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="730" y="237" /> | ||
<mxPoint x="730" y="400" /> | ||
<mxPoint x="320" y="400" /> | ||
<mxPoint x="320" y="237" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-8" value="<font style="font-size: 11px">Average<br></font>" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#36393d;strokeWidth=2;fillColor=#ffff88;fontSize=8;align=center;verticalAlign=top;labelPosition=center;verticalLabelPosition=bottom;" vertex="1" parent="1"> | ||
<mxGeometry x="650" y="207.5" width="57" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="j3rSS8qZvCsvwcYJBwNX-10" target="j3rSS8qZvCsvwcYJBwNX-5"> | ||
<mxGeometry relative="1" as="geometry"> | ||
<Array as="points"> | ||
<mxPoint x="730" y="330" /> | ||
<mxPoint x="730" y="400" /> | ||
<mxPoint x="320" y="400" /> | ||
<mxPoint x="320" y="237" /> | ||
</Array> | ||
</mxGeometry> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-10" value="<font style="font-size: 11px">Counter<br></font>" style="ellipse;whiteSpace=wrap;html=1;strokeColor=#36393d;strokeWidth=2;fillColor=#ffff88;fontSize=8;align=center;verticalAlign=top;labelPosition=center;verticalLabelPosition=bottom;" vertex="1" parent="1"> | ||
<mxGeometry x="650" y="300" width="57" height="60" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="j3rSS8qZvCsvwcYJBwNX-3" target="j3rSS8qZvCsvwcYJBwNX-8"> | ||
<mxGeometry relative="1" as="geometry" /> | ||
</mxCell> | ||
<mxCell id="j3rSS8qZvCsvwcYJBwNX-12" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="j3rSS8qZvCsvwcYJBwNX-3" target="j3rSS8qZvCsvwcYJBwNX-10"> | ||
<mxGeometry relative="1" as="geometry" /> | ||
</mxCell> | ||
</root> | ||
</mxGraphModel> | ||
</diagram> | ||
</mxfile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import os | ||
import math | ||
|
||
from testbook import testbook | ||
from testbook.client import TestbookNotebookClient | ||
|
||
from ..utils import get_examples_path | ||
|
||
examples_path = get_examples_path() | ||
|
||
@testbook(os.path.join(examples_path, "Publisher-Subscriber.ipynb"), execute=True) | ||
def test_publisher_subscriber(tb :TestbookNotebookClient): | ||
expected_results : list[list] = [10, 15, 10, 15, 10, 15] | ||
|
||
for i, excepted_result in enumerate(expected_results): | ||
result = tb.cell_output_text(f"check_average{i}") | ||
result = eval(result) | ||
|
||
assert math.isclose(result, excepted_result) |